about summary refs log tree commit diff
path: root/modules/shell
diff options
context:
space:
mode:
Diffstat (limited to 'modules/shell')
-rw-r--r--modules/shell/cargo/default.nix9
-rw-r--r--modules/shell/default.nix4
2 files changed, 12 insertions, 1 deletions
diff --git a/modules/shell/cargo/default.nix b/modules/shell/cargo/default.nix
new file mode 100644
index 000000000000..246571c33e60
--- /dev/null
+++ b/modules/shell/cargo/default.nix
@@ -0,0 +1,9 @@
+{ ... }:
+
+{
+  environment.extraInit = ''
+    export CARGO_HOME="$HOME/state/cargo"
+  '';
+
+  home.qyliss.dirs."state/cargo" = {};
+}
diff --git a/modules/shell/default.nix b/modules/shell/default.nix
index 61d10cda0680..e7a2c181eaf8 100644
--- a/modules/shell/default.nix
+++ b/modules/shell/default.nix
@@ -1,7 +1,9 @@
 { pkgs, ... }:
 
 {
-  imports = [ ./direnv ./git ./kakoune ./less ./lynx ./pass ./tmux ./zsh ];
+  imports = [
+    ./cargo ./direnv ./git ./kakoune ./less ./lynx ./pass ./tmux ./zsh
+  ];
 
   environment.systemPackages = with pkgs; [
     (aspellWithDicts (dicts: with dicts; [ en en-computers en-science eo ]))