add sccache
This commit is contained in:
parent
187bc9261e
commit
2713f04a9e
3 changed files with 23 additions and 2 deletions
|
@ -1,3 +1,3 @@
|
|||
{ ... }: {
|
||||
imports = [ ./catppuccin.nix ./nvim.nix ./riff.nix ./vscode.nix ./git.nix ];
|
||||
imports = [ ./catppuccin.nix ./nvim.nix ./riff.nix ./vscode.nix ./git.nix ./rust.nix ];
|
||||
}
|
||||
|
|
21
nixos/common/hm-modules/rust.nix
Normal file
21
nixos/common/hm-modules/rust.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ 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 ];
|
||||
|
||||
home.file = {
|
||||
".cargo/config.toml".text = ''
|
||||
[registries.crates-io]
|
||||
protocol = "sparse"
|
||||
|
||||
[build]
|
||||
rustc-wrapper = "${pkgs.sccache}/bin/sccache"
|
||||
'';
|
||||
};
|
||||
|
||||
home.sessionPath = [ "$HOME/.cargo/bin" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue