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 ‘--upgrade’ is given, run ‘nix-channel --update nixos’.
|
||||||
if [ -n "$upgrade" -a -z "$_NIXOS_REBUILD_REEXEC" ]; then
|
if [ -n "$upgrade" -a -z "$_NIXOS_REBUILD_REEXEC" ]; then
|
||||||
nix-channel --update nixos
|
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
|
fi
|
||||||
|
|
||||||
# Make sure that we use the Nix package we depend on, not something
|
# 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"
|
[ "/nix/var/nix/profiles/per-user/root/channels/nixos"
|
||||||
"nixpkgs=/etc/nixos/nixpkgs"
|
"nixpkgs=/etc/nixos/nixpkgs"
|
||||||
"nixos-config=/etc/nixos/configuration.nix"
|
"nixos-config=/etc/nixos/configuration.nix"
|
||||||
|
"/nix/var/nix/profiles/per-user/root/channels"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user