infrastructure/nixos/common/hm-modules/rust.nix
Vivian 1ec8d8517b
Some checks failed
Lint / lint (push) Failing after 1m28s
Plex Update / update (push) Successful in 1m47s
nvim updates
2023-12-06 22:03:27 +01:00

24 lines
523 B
Nix

{ pkgs, lib, config, ... }:
with lib;
let cfg = config.programs.v.rust;
in {
options.programs.v.rust = { enable = mkEnableOption "rust"; };
config = mkIf cfg.enable {
home = {
packages = with pkgs; [ rustup cargo-nextest cargo-msrv ];
file = {
".cargo/config.toml".text = ''
[registries.crates-io]
protocol = "sparse"
[build]
rustc-wrapper = "${pkgs.sccache}/bin/sccache"
'';
};
sessionPath = [ "$HOME/.cargo/bin" ];
};
};
}