about summary refs log tree commit diff
path: root/home/rust
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-08-22 19:12:06 -0700
committerFranck Cuny <franck@fcuny.net>2022-08-22 19:12:06 -0700
commitb919a1592580af487eade8eb00b8e459810c52fd (patch)
treed4720d5d6a29944d341d638015f2c5f87470bab5 /home/rust
parentref(modules/backup): only keep 4 weeks worth of backups (diff)
downloadworld-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/rust')
-rw-r--r--home/rust/default.nix17
1 files changed, 17 insertions, 0 deletions
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" ];
+  };
+}