add sccache
This commit is contained in:
parent
0eebdf6bd0
commit
ec0c2f466a
3 changed files with 23 additions and 2 deletions
|
@ -35,7 +35,6 @@ in
|
|||
plexamp
|
||||
spotify
|
||||
qmk
|
||||
rustup
|
||||
solo2-cli
|
||||
tex
|
||||
unzip
|
||||
|
@ -47,6 +46,7 @@ in
|
|||
programs = {
|
||||
v.vscode.enable = true;
|
||||
v.nvim.enable = true;
|
||||
v.rust.enable = true;
|
||||
|
||||
riff = {
|
||||
enable = true;
|
||||
|
|
|
@ -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
Reference in a new issue