mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to pkgs.path via nix.settings.registry
This commit is contained in:
parent
2367007613
commit
31dbd4cb91
1 changed files with 1 additions and 4 deletions
|
@ -31,6 +31,7 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
nix.registry.nixpkgs.flake.outPath = pkgs.path;
|
||||||
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
|
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
|
||||||
# for nixos-install.
|
# for nixos-install.
|
||||||
boot.postBootCommands = mkAfter
|
boot.postBootCommands = mkAfter
|
||||||
|
@ -45,10 +46,6 @@ in
|
||||||
ln -s /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels
|
ln -s /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels
|
||||||
mkdir -m 0755 -p /var/lib/nixos
|
mkdir -m 0755 -p /var/lib/nixos
|
||||||
touch /var/lib/nixos/did-channel-init
|
touch /var/lib/nixos/did-channel-init
|
||||||
echo "pinning the nixpkgs registry entry to NixOS/Nixpkgs sources..."
|
|
||||||
${config.nix.package.out}/bin/nix \
|
|
||||||
--extra-experimental-features 'nix-command flakes' \
|
|
||||||
registry pin nixpkgs ${toString pkgs.path}
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue