This commit is contained in:
Vivian 2023-11-10 23:41:30 +01:00
parent 2713f04a9e
commit 99c5b9d802
3 changed files with 114 additions and 113 deletions

View file

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