summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-26 08:12:03 +0000
committerAlyssa Ross <hi@alyssa.is>2023-10-02 18:47:48 +0000
commitdc439e41db1136d63f15fd42c0fa8b4f3b65f93b (patch)
tree737ab658b10728e5056de76ee1c08facd8e9e1de /nixos/modules/programs
parent3c4a65f323dd8c6ec34b1c1a63eb968b0ee4fb67 (diff)
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.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/environment.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix
index 324b19184747d..6cf9257d035a0 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" ];