mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
Merge pull request #7349 from aszlig/custom-channels
Make it easy to add system-wide custom channels.
This commit is contained in:
commit
3fe102b797
@ -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
|
||||
|
@ -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"
|
||||
];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user