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.
This commit is contained in:
Alyssa Ross 2023-06-26 08:12:03 +00:00
parent 3c4a65f323
commit dc439e41db

View File

@ -22,7 +22,6 @@ in
# be specified here; do so in the default value of programs.less.envVariables instead # be specified here; do so in the default value of programs.less.envVariables instead
PAGER = mkDefault "less"; PAGER = mkDefault "less";
EDITOR = mkDefault "nano"; 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 # since we set PAGER to this above, make sure it's installed
@ -33,6 +32,11 @@ in
"/run/current-system/sw" "/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 # TODO: move most of these elsewhere
environment.profileRelativeSessionVariables = environment.profileRelativeSessionVariables =
{ PATH = [ "/bin" ]; { PATH = [ "/bin" ];