summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2020-12-12 21:47:33 +0100
committerAlan Pearce2020-12-12 21:47:33 +0100
commitf27988541113da203ec30121b4e046f1b2b7e320 (patch)
tree5d77e13937b77ac311ec560c5cc44ca242cb33a9
parentade124a556ce83405cad824d2a571ffe776b0f30 (diff)
downloadnixfiles-f27988541113da203ec30121b4e046f1b2b7e320.tar.lz
nixfiles-f27988541113da203ec30121b4e046f1b2b7e320.tar.zst
nixfiles-f27988541113da203ec30121b4e046f1b2b7e320.zip
Don't assume usages of XDG_ will be expanded
-rw-r--r--user/settings/base.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/user/settings/base.nix b/user/settings/base.nix
index b181d4ad..eda280fa 100644
--- a/user/settings/base.nix
+++ b/user/settings/base.nix
@@ -42,11 +42,16 @@
       };
     };
   };
-    EMAIL = "alan@alanpearce.eu";
-    XDG_CACHE_HOME = if pkgs.stdenv.isDarwin then "$HOME/Library/Caches/XDG" else "$HOME/.cache";
-    XDG_CONFIG_HOME = "$HOME/.config";
-    XDG_DATA_HOME = "$HOME/.local/share";
-  };
+  home.sessionVariables =
+    let
+      HOME = builtins.getEnv "HOME";
+    in
+    {
+      EMAIL = "alan@alanpearce.eu";
+      XDG_CACHE_HOME = if pkgs.stdenv.isDarwin then "${HOME}/Library/Caches/XDG" else "${HOME}/.cache";
+      XDG_CONFIG_HOME = "${HOME}/.config";
+      XDG_DATA_HOME = "${HOME}/.local/share";
+    };
 
   programs.zsh.shellAliases = {
     make = "remake";