base: let home-manager handle XDG paths
Alan Pearce alan@alanpearce.eu
Sun, 02 Apr 2023 20:24:43 +0200
1 files changed, 9 insertions(+), 5 deletions(-)
jump to
M user/settings/base.nix → user/settings/base.nix
@@ -13,12 +13,16 @@ html.enable = true; }; home.sessionVariables = { EMAIL = "alan@alanpearce.eu"; - XDG_CACHE_HOME = + }; + xdg = { + enable = true; + cacheHome = if pkgs.stdenv.isDarwin - then "$HOME/Library/Caches/XDG" - else "$HOME/.cache"; - XDG_CONFIG_HOME = "$HOME/.config"; - XDG_DATA_HOME = "$HOME/.local/share"; + then "${config.home.homeDirectory}/Library/Caches/XDG" + else "${config.home.homeDirectory}/.cache"; + configHome = "${config.home.homeDirectory}/.config"; + dataHome = "${config.home.homeDirectory}/.local/share"; + stateHome = "${config.home.homeDirectory}/.local/state"; }; programs.zsh.shellAliases = {