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.
This commit is contained in:
Jan Tojnar 2019-08-24 16:01:01 +02:00
parent 865293c508
commit 48426833c8
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -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