Skip to content

Commit

Permalink
nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to p…
Browse files Browse the repository at this point in the history
…kgs.path via nix.settings.registry
  • Loading branch information
MatthewCroughan committed Sep 26, 2022
1 parent 2367007 commit 31dbd4c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions nixos/modules/installer/cd-dvd/channel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ let
in

{
nix.registry.nixpkgs.flake.outPath = pkgs.path;
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
# for nixos-install.
boot.postBootCommands = mkAfter
Expand All @@ -45,10 +46,6 @@ in
ln -s /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels
mkdir -m 0755 -p /var/lib/nixos
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
'';
}

0 comments on commit 31dbd4c

Please sign in to comment.