summary refs log tree commit diff
path: root/nixos/modules/programs/environment.nix
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-08-24 16:01:01 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-08-24 16:01:01 +0200
commit48426833c861ad8c4e601324462b352c58b8b230 (patch)
tree7df2fdc79be878dddbe33c96273159c22d2be236 /nixos/modules/programs/environment.nix
parent865293c5080abfb0031bd1602f21f48ef206c739 (diff)
downloadnixpkgs-48426833c861ad8c4e601324462b352c58b8b230.tar
nixpkgs-48426833c861ad8c4e601324462b352c58b8b230.tar.gz
nixpkgs-48426833c861ad8c4e601324462b352c58b8b230.tar.bz2
nixpkgs-48426833c861ad8c4e601324462b352c58b8b230.tar.lz
nixpkgs-48426833c861ad8c4e601324462b352c58b8b230.tar.xz
nixpkgs-48426833c861ad8c4e601324462b352c58b8b230.tar.zst
nixpkgs-48426833c861ad8c4e601324462b352c58b8b230.zip
nixos/environment: prepend /etc/xdg to XDG_CONFIG_DIRS
Previously, we were only adding profile-relative paths to XDG_CONFIG_DIRS
variable. That required very ugly hacks like
https://github.com/NixOS/nixpkgs/issues/33282#issuecomment-524550842
to be able to configure XDG stuff.

Now, we are prepending the variable with /etc/xdg, allowing us to
simply use `environment.etc."xdg/…"` options.
Diffstat (limited to 'nixos/modules/programs/environment.nix')
-rw-r--r--nixos/modules/programs/environment.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix
index 4d762314298..66eb8348266 100644
--- a/nixos/modules/programs/environment.nix
+++ b/nixos/modules/programs/environment.nix
@@ -21,6 +21,7 @@ in
         PAGER = mkDefault "less -R";
         EDITOR = mkDefault "nano";
         XCURSOR_PATH = [ "$HOME/.icons" ];
+        XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc
       };
 
     environment.profiles = mkAfter