Merge pull request #7349 from aszlig/custom-channels

Make it easy to add system-wide custom channels.
This commit is contained in:
Eelco Dolstra 2015-04-14 13:00:34 +02:00
commit 3fe102b797
2 changed files with 9 additions and 0 deletions

View File

@ -96,6 +96,14 @@ fi
# 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

View File

@ -28,6 +28,7 @@ in
[ "/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"
];
};