From 843c2c669e0545eea3c2b7876aa6b83b24de03b6 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 2 Apr 2023 20:24:43 +0200 Subject: base: let home-manager handle XDG paths --- user/settings/base.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/user/settings/base.nix b/user/settings/base.nix index b8e95425..37c9ef1c 100644 --- a/user/settings/base.nix +++ b/user/settings/base.nix @@ -13,12 +13,16 @@ }; 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 = { -- cgit 1.4.1