infrastructure/nixos/common/hm-modules/rust.nix
Vivian 68cb70ee4d
Some checks failed
Lint / lint (push) Failing after 1m13s
Plex Update / update (push) Successful in 1m33s
fix lint
2023-11-10 23:41:30 +01:00

24 lines
497 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 ];
file = {
".cargo/config.toml".text = ''
[registries.crates-io]
protocol = "sparse"
[build]
rustc-wrapper = "${pkgs.sccache}/bin/sccache"
'';
};
sessionPath = [ "$HOME/.cargo/bin" ];
};
};
}