all repos — nixfiles @ f27988541113da203ec30121b4e046f1b2b7e320

System and user configuration, managed by nix and home-manager

Don't assume usages of XDG_ will be expanded
Alan Pearce alan@alanpearce.eu
Sat, 12 Dec 2020 21:47:33 +0100
commit

f27988541113da203ec30121b4e046f1b2b7e320

parent

ade124a556ce83405cad824d2a571ffe776b0f30

1 files changed, 10 insertions(+), 5 deletions(-)

jump to
M user/settings/base.nixuser/settings/base.nix
@@ -42,11 +42,16 @@ "suggest.enablePreview" = true;       };
     };
   };
-    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";