From 2367007613f53172caedd0e958506b7f2fc3a36d Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Wed, 31 Aug 2022 14:10:09 +0100 Subject: [PATCH] nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to pkgs.path via boot.postBootCommands --- nixos/modules/installer/cd-dvd/channel.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/installer/cd-dvd/channel.nix b/nixos/modules/installer/cd-dvd/channel.nix index 2f91cd39881d..159a9ca28c3e 100644 --- a/nixos/modules/installer/cd-dvd/channel.nix +++ b/nixos/modules/installer/cd-dvd/channel.nix @@ -45,6 +45,10 @@ 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 ''; }