From 2367007613f53172caedd0e958506b7f2fc3a36d Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Wed, 31 Aug 2022 14:10:09 +0100 Subject: 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(+) (limited to 'nixos/modules/installer') diff --git a/nixos/modules/installer/cd-dvd/channel.nix b/nixos/modules/installer/cd-dvd/channel.nix index 2f91cd39881d8..159a9ca28c3ee 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 ''; } -- cgit 1.4.1 From 31dbd4cb91968ac645f48c6804271b54d12cf37d Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Wed, 31 Aug 2022 14:38:37 +0100 Subject: nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to pkgs.path via nix.settings.registry --- nixos/modules/installer/cd-dvd/channel.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'nixos/modules/installer') diff --git a/nixos/modules/installer/cd-dvd/channel.nix b/nixos/modules/installer/cd-dvd/channel.nix index 159a9ca28c3ee..9893f5aa7dcb0 100644 --- a/nixos/modules/installer/cd-dvd/channel.nix +++ b/nixos/modules/installer/cd-dvd/channel.nix @@ -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 @@ -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 ''; } -- cgit 1.4.1 From c40da01e17c96a769be6c0ed037f6e3eae9edea8 Mon Sep 17 00:00:00 2001 From: MatthewCroughan Date: Mon, 26 Sep 2022 19:36:13 +0100 Subject: Update nixos/modules/installer/cd-dvd/channel.nix Co-authored-by: Louis Bettens --- nixos/modules/installer/cd-dvd/channel.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/installer') diff --git a/nixos/modules/installer/cd-dvd/channel.nix b/nixos/modules/installer/cd-dvd/channel.nix index 9893f5aa7dcb0..2a0feaeb28456 100644 --- a/nixos/modules/installer/cd-dvd/channel.nix +++ b/nixos/modules/installer/cd-dvd/channel.nix @@ -31,7 +31,7 @@ let in { - nix.registry.nixpkgs.flake.outPath = pkgs.path; + nix.registry.nixpkgs.flake.outPath = builtins.path { name = "source"; path = pkgs.path; }; # Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required # for nixos-install. boot.postBootCommands = mkAfter -- cgit 1.4.1