Commit dc439e41 authored by Alyssa Ross's avatar Alyssa Ross
Browse files

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.
parent 3c4a65f3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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" ];