From dc439e41db1136d63f15fd42c0fa8b4f3b65f93b Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 26 Jun 2023 08:12:03 +0000 Subject: [PATCH] nixos/environment: move XDG_CONFIG_DIRS to sessionVariables Otherwise, in non-interactive contexts (e.g. systemd units), this entry (the default) won't be in the list. Only the profile relative ones would be, since they were already using session variables. This is clearly not the correct behavior. --- nixos/modules/programs/environment.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix index 324b1918474..6cf9257d035 100644 --- a/nixos/modules/programs/environment.nix +++ b/nixos/modules/programs/environment.nix @@ -22,7 +22,6 @@ in # be specified here; do so in the default value of programs.less.envVariables instead PAGER = mkDefault "less"; EDITOR = mkDefault "nano"; - XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc }; # since we set PAGER to this above, make sure it's installed @@ -33,6 +32,11 @@ in "/run/current-system/sw" ]; + environment.sessionVariables = + { + XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc + }; + # TODO: move most of these elsewhere environment.profileRelativeSessionVariables = { PATH = [ "/bin" ];