From bf7853628eef57486b21ffd398b81d67928f14dc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 Jan 2025 01:00:32 +0000 Subject: [PATCH 1/5] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixos-unstable': 'github:NixOS/nixpkgs/4989a246d7a390a859852baddb1013f825435cee?narHash=sha256-kMBQ5PRiFLagltK0sH%2B08aiNt3zGERC2297iB6vrvlU%3D' (2024-12-17) → 'github:NixOS/nixpkgs/2f9e2f85cb14a46410a1399aa9ea7ecf433e422e?narHash=sha256-FWlPMUzp0lkQBdhKlPqtQdqmp%2B/C%2B1MBiEytaYfrCTY%3D' (2025-01-12) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 14b0852..1fe8db7 100644 --- a/flake.lock +++ b/flake.lock @@ -18,11 +18,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1734435836, - "narHash": "sha256-kMBQ5PRiFLagltK0sH+08aiNt3zGERC2297iB6vrvlU=", + "lastModified": 1736657626, + "narHash": "sha256-FWlPMUzp0lkQBdhKlPqtQdqmp+/C+1MBiEytaYfrCTY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4989a246d7a390a859852baddb1013f825435cee", + "rev": "2f9e2f85cb14a46410a1399aa9ea7ecf433e422e", "type": "github" }, "original": { From 63bf75b419ffc22b3097f3b9973a1be3e03a43c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 13 Jan 2025 11:39:00 +0100 Subject: [PATCH 2/5] rename kexecTarball to kexecInstallerTarball upstream now defines kexecTarball --- flake.nix | 6 +++--- nix/kexec-installer/module.nix | 2 +- nix/kexec-installer/test.nix | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 326a6be..6fb8569 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ packages = forAllSystems (system: let netboot = nixpkgs: (import (nixpkgs + "/nixos/release.nix") { }).netboot.${system}; - kexec-installer = nixpkgs: module: (nixpkgs.legacyPackages.${system}.nixos [ module self.nixosModules.kexec-installer ]).config.system.build.kexecTarball; + kexec-installer = nixpkgs: module: (nixpkgs.legacyPackages.${system}.nixos [ module self.nixosModules.kexec-installer ]).config.system.build.kexecInstallerTarball; netboot-installer = nixpkgs: (nixpkgs.legacyPackages.${system}.nixos [ self.nixosModules.netboot-installer ]).config.system.build.netboot; image-installer = nixpkgs: (nixpkgs.legacyPackages.${system}.nixos [ self.nixosModules.image-installer ]).config.system.build.isoImage; in @@ -70,11 +70,11 @@ in { kexec-installer-unstable = pkgsUnstable.callPackage ./nix/kexec-installer/test.nix { - kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive; + kexecInstallerTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive; }; kexec-installer-stable = nixos-stable.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix { - kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-stable-noninteractive; + kexecInstallerTarball = self.packages.x86_64-linux.kexec-installer-nixos-stable-noninteractive; }; shellcheck = pkgsUnstable.runCommand "shellcheck" { diff --git a/nix/kexec-installer/module.nix b/nix/kexec-installer/module.nix index 4628813..4735afe 100644 --- a/nix/kexec-installer/module.nix +++ b/nix/kexec-installer/module.nix @@ -47,7 +47,7 @@ in ${pkgs.shellcheck}/bin/shellcheck $out ''; - system.build.kexecTarball = pkgs.runCommand "kexec-tarball" { } '' + system.build.kexecInstallerTarball = pkgs.runCommand "kexec-tarball" { } '' mkdir kexec $out cp "${config.system.build.netbootRamdisk}/initrd" kexec/initrd cp "${config.system.build.kernel}/${config.system.boot.loader.kernelFile}" kexec/bzImage diff --git a/nix/kexec-installer/test.nix b/nix/kexec-installer/test.nix index 5012630..a1192e6 100644 --- a/nix/kexec-installer/test.nix +++ b/nix/kexec-installer/test.nix @@ -1,6 +1,6 @@ { pkgs , lib -, kexecTarball +, kexecInstallerTarball }: pkgs.testers.runNixOSTest { @@ -16,7 +16,7 @@ pkgs.testers.runNixOSTest { (modulesPath + "/profiles/minimal.nix") ]; - system.extraDependencies = [ kexecTarball ]; + system.extraDependencies = [ kexecInstallerTarball ]; virtualisation.memorySize = 1 * 1024; virtualisation.diskSize = 4 * 1024; virtualisation.forwardPorts = [{ @@ -134,7 +134,7 @@ pkgs.testers.runNixOSTest { node1.succeed('touch /run/foo') old_machine_id = node1.succeed("cat /etc/machine-id").strip() node1.fail('parted --version >&2') - node1.succeed('tar -xf ${kexecTarball}/nixos-kexec-installer-noninteractive-${pkgs.system}.tar.gz -C /root') + node1.succeed('tar -xf ${kexecInstallerTarball}/nixos-kexec-installer-noninteractive-${pkgs.system}.tar.gz -C /root') node1.succeed('/root/kexec/ip -V >&2') node1.succeed('/root/kexec/kexec --version >&2') # test with dash here to make sure we don't introduce bashisms From d51c18ecbb8e30805db6561c9a43a151b46915d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 13 Jan 2025 11:58:21 +0100 Subject: [PATCH 3/5] bump nixos-stable --- flake.lock | 18 +++++++++--------- flake.nix | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 1fe8db7..4e5e28a 100644 --- a/flake.lock +++ b/flake.lock @@ -2,27 +2,27 @@ "nodes": { "nixos-stable": { "locked": { - "lastModified": 1733151992, - "narHash": "sha256-o62gECqmpsXxXEtr2Ns1L6CYAFyS0cmuZW7v2zqr+vM=", - "owner": "Mic92", + "lastModified": 1736549401, + "narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "f13a1a165096903d5174cded99ba821e617a47a1", + "rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899", "type": "github" }, "original": { - "owner": "Mic92", - "ref": "compression-24.11", + "owner": "NixOS", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixos-unstable": { "locked": { - "lastModified": 1736657626, - "narHash": "sha256-FWlPMUzp0lkQBdhKlPqtQdqmp+/C+1MBiEytaYfrCTY=", + "lastModified": 1736693123, + "narHash": "sha256-9lIfXCaBPwUA7FnfDnoH4gxxdOvXG78k6UlUw0+ZDxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2f9e2f85cb14a46410a1399aa9ea7ecf433e422e", + "rev": "2fdec2c2e68b7b7845d1ea4e0894c63143e3261b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6fb8569..eb2ad34 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "NixOS images"; inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.nixos-stable.url = "github:Mic92/nixpkgs/compression-24.11"; + inputs.nixos-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; nixConfig.extra-substituters = [ "https://nix-community.cachix.org" ]; nixConfig.extra-trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; From edec5f7d5ca20a5f6e18218d80d2ce1f7001989d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 13 Jan 2025 12:04:36 +0100 Subject: [PATCH 4/5] switch to shallow clones for nixpkgs inputs --- flake.lock | 26 ++++++++++++++------------ flake.nix | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 4e5e28a..5b5638f 100644 --- a/flake.lock +++ b/flake.lock @@ -4,32 +4,34 @@ "locked": { "lastModified": 1736549401, "narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=", - "owner": "NixOS", - "repo": "nixpkgs", + "ref": "nixos-24.11", "rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899", - "type": "github" + "shallow": true, + "type": "git", + "url": "https://github.com/NixOS/nixpkgs" }, "original": { - "owner": "NixOS", "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" + "shallow": true, + "type": "git", + "url": "https://github.com/NixOS/nixpkgs" } }, "nixos-unstable": { "locked": { "lastModified": 1736693123, "narHash": "sha256-9lIfXCaBPwUA7FnfDnoH4gxxdOvXG78k6UlUw0+ZDxc=", - "owner": "NixOS", - "repo": "nixpkgs", + "ref": "nixpkgs-unstable", "rev": "2fdec2c2e68b7b7845d1ea4e0894c63143e3261b", - "type": "github" + "shallow": true, + "type": "git", + "url": "https://github.com/NixOS/nixpkgs" }, "original": { - "owner": "NixOS", "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "shallow": true, + "type": "git", + "url": "https://github.com/NixOS/nixpkgs" } }, "root": { diff --git a/flake.nix b/flake.nix index eb2ad34..761d9f8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,8 @@ { description = "NixOS images"; - inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.nixos-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; + inputs.nixos-unstable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixpkgs-unstable"; + inputs.nixos-stable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-24.11"; nixConfig.extra-substituters = [ "https://nix-community.cachix.org" ]; nixConfig.extra-trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; From ca591edd9f09ba9869bc009d8f73ce66d100c0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 13 Jan 2025 12:34:39 +0100 Subject: [PATCH 5/5] fix image base name for unstable --- nix/image-installer/module.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/image-installer/module.nix b/nix/image-installer/module.nix index 44a2100..1ec73b3 100644 --- a/nix/image-installer/module.nix +++ b/nix/image-installer/module.nix @@ -121,5 +121,8 @@ in # No one got time for xz compression. isoImage.squashfsCompression = "zstd"; +} // (if lib.versionAtLeast lib.version "25.03pre" then { + image.baseName = lib.mkForce "nixos-installer-${pkgs.system}"; +} else { isoImage.isoName = lib.mkForce "nixos-installer-${pkgs.system}.iso"; -} +})