diff options
author | Franck Cuny <franck@fcuny.net> | 2022-08-22 19:12:06 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-08-22 19:12:06 -0700 |
commit | b919a1592580af487eade8eb00b8e459810c52fd (patch) | |
tree | d4720d5d6a29944d341d638015f2c5f87470bab5 /home | |
parent | ref(modules/backup): only keep 4 weeks worth of backups (diff) | |
download | world-b919a1592580af487eade8eb00b8e459810c52fd.tar.gz |
feat(rust): add an overlay to install rust
Installing the rust overlay to get the various tools installed. This is done by a new module for home-manager, and is installed only on my laptop at the moment. Change-Id: I80c1633ca04da82f4321a0687a05d1df7c523702
Diffstat (limited to 'home')
-rw-r--r-- | home/default.nix | 1 | ||||
-rw-r--r-- | home/rust/default.nix | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/home/default.nix b/home/default.nix index 7972470..f7eca99 100644 --- a/home/default.nix +++ b/home/default.nix @@ -24,6 +24,7 @@ ./pass ./pcmanfm ./python + ./rust ./scanner ./seahorse ./shell diff --git a/home/rust/default.nix b/home/rust/default.nix new file mode 100644 index 0000000..2fe5053 --- /dev/null +++ b/home/rust/default.nix @@ -0,0 +1,17 @@ +{ lib, config, pkgs, ... }: +let cfg = config.my.home.rust; +in +{ + options.my.home.rust = with lib; { + enable = mkEnableOption "rust configuration"; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + rust-bin.beta.latest.default + rust-analyzer + ]; + home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo"; + home.sessionPath = [ "$CARGO_HOME/bin" ]; + }; +} |