Skip to content

Commit

Permalink
Merge pull request #314 from nix-community/update_flake_lock_action
Browse files Browse the repository at this point in the history
flake.lock: Update
  • Loading branch information
Mic92 authored Jan 13, 2025
2 parents 0a157d0 + ca591ed commit 33b510d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 29 deletions.
40 changes: 21 additions & 19 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
description = "NixOS images";

inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.nixos-stable.url = "github:Mic92/nixpkgs/compression-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=" ];
Expand All @@ -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
Expand Down Expand Up @@ -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"
{
Expand Down
5 changes: 4 additions & 1 deletion nix/image-installer/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
})
2 changes: 1 addition & 1 deletion nix/kexec-installer/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions nix/kexec-installer/test.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ pkgs
, lib
, kexecTarball
, kexecInstallerTarball
}:

pkgs.testers.runNixOSTest {
Expand All @@ -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 = [{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 33b510d

Please sign in to comment.