summary refs log tree commit diff
path: root/nixos/modules/installer/cd-dvd
diff options
context:
space:
mode:
authormatthewcroughan <matt@croughan.sh>2022-08-31 14:10:09 +0100
committermatthewcroughan <matt@croughan.sh>2022-08-31 14:42:05 +0100
commit2367007613f53172caedd0e958506b7f2fc3a36d (patch)
treee8d908b0d9e84f072fd2cf97674d40003d5080b5 /nixos/modules/installer/cd-dvd
parent98ef945bc34fd083f49e6633ecda01365b8a5001 (diff)
downloadnixpkgs-2367007613f53172caedd0e958506b7f2fc3a36d.tar
nixpkgs-2367007613f53172caedd0e958506b7f2fc3a36d.tar.gz
nixpkgs-2367007613f53172caedd0e958506b7f2fc3a36d.tar.bz2
nixpkgs-2367007613f53172caedd0e958506b7f2fc3a36d.tar.lz
nixpkgs-2367007613f53172caedd0e958506b7f2fc3a36d.tar.xz
nixpkgs-2367007613f53172caedd0e958506b7f2fc3a36d.tar.zst
nixpkgs-2367007613f53172caedd0e958506b7f2fc3a36d.zip
nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to pkgs.path via boot.postBootCommands
Diffstat (limited to 'nixos/modules/installer/cd-dvd')
-rw-r--r--nixos/modules/installer/cd-dvd/channel.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/installer/cd-dvd/channel.nix b/nixos/modules/installer/cd-dvd/channel.nix
index 2f91cd39881..159a9ca28c3 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
     '';
 }