Merge pull request #7349 from aszlig/custom-channels

Make it easy to add system-wide custom channels.

Changed files
+9
nixos
modules
installer
programs
+8
nixos/modules/installer/tools/nixos-rebuild.sh
···
# If ‘--upgrade’ is given, run ‘nix-channel --update nixos’.
if [ -n "$upgrade" -a -z "$_NIXOS_REBUILD_REEXEC" ]; then
nix-channel --update nixos
+
+
# If there are other channels that contain a file called
+
# ".update-on-nixos-rebuild", update them as well.
+
for channelpath in /nix/var/nix/profiles/per-user/root/channels/*; do
+
if [ -e "$channelpath/.update-on-nixos-rebuild" ]; then
+
nix-channel --update "$(basename "$channelpath")"
+
fi
+
done
fi
# Make sure that we use the Nix package we depend on, not something
+1
nixos/modules/programs/environment.nix
···
[ "/nix/var/nix/profiles/per-user/root/channels/nixos"
"nixpkgs=/etc/nixos/nixpkgs"
"nixos-config=/etc/nixos/configuration.nix"
+
"/nix/var/nix/profiles/per-user/root/channels"
];
};