about summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/default.nix1
-rw-r--r--home/rust/default.nix17
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" ];
+  };
+}