Don't assume usages of XDG_ will be expanded
Alan Pearce alan@alanpearce.eu
Sat, 12 Dec 2020 21:47:33 +0100
1 files changed, 10 insertions(+), 5 deletions(-)
jump to
M user/settings/base.nix → user/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";