Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

environment.profiles: fix order of profiles

This change is needed because the order of profiles correlate to the
order in PATH, therefore "/etc/profiles/per-user/$USER" always appeared
after the system packages directories.

(cherry picked from commit 33c834f2fb2c25f2351cd0ae9b8cc361e033141b)

authored by Tobias Happ and committed by Matthew Bauer 2aead242 e823132d

Changed files
+6 -4
nixos
modules
+4 -1
nixos/modules/config/users-groups.nix
··· 564 564 }; 565 565 }) (filterAttrs (_: u: u.packages != []) cfg.users)); 566 566 567 - environment.profiles = [ "/etc/profiles/per-user/$USER" ]; 567 + environment.profiles = [ 568 + "$HOME/.nix-profile" 569 + "/etc/profiles/per-user/$USER" 570 + ]; 568 571 569 572 assertions = [ 570 573 { assertion = !cfg.enforceIdUniqueness || (uidsAreUnique && gidsAreUnique);
+2 -3
nixos/modules/programs/environment.nix
··· 23 23 XCURSOR_PATH = [ "$HOME/.icons" ]; 24 24 }; 25 25 26 - environment.profiles = 27 - [ "$HOME/.nix-profile" 28 - "/nix/var/nix/profiles/default" 26 + environment.profiles = mkAfter 27 + [ "/nix/var/nix/profiles/default" 29 28 "/run/current-system/sw" 30 29 ]; 31 30