all repos — nixfiles @ 843c2c669e0545eea3c2b7876aa6b83b24de03b6

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

base: let home-manager handle XDG paths
Alan Pearce alan@alanpearce.eu
Sun, 02 Apr 2023 20:24:43 +0200
commit

843c2c669e0545eea3c2b7876aa6b83b24de03b6

parent

cfe7ce6921e4ee5fd0426353e86cbe04751091e5

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

jump to
M user/settings/base.nixuser/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 = {