Skip to content

Commit 0d07933

Browse files
RaitoBezarius9999years
authored andcommitted
nixos/tests/installer: introduce lix-simple variant
An installer tests exacerbates the distribution packaging but in the case of NixOS: the Nix package manager implementation. As part of our classical release management process, the Lix team tests whether a NixOS system installs just fine with Lix or not. To avoid bloating the CI needlessly and keeping it simple, we only introduce it on the simple variant and give a general way to pipe a Nix implementation inside of an installer test. Change-Id: I781da14475867dc2d946b740bad10af5de79ec5a Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
1 parent 3029bd7 commit 0d07933

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

nixos/tests/installer.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ let
638638
clevisTest ? false,
639639
clevisFallbackTest ? false,
640640
disableFileSystems ? false,
641+
selectNixPackage ? pkgs: pkgs.nixStable,
641642
}:
642643
let
643644
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
@@ -701,6 +702,7 @@ let
701702
virtualisation.rootDevice = "/dev/vdb";
702703

703704
hardware.enableAllFirmware = mkForce false;
705+
nix.package = selectNixPackage pkgs;
704706

705707
# The test cannot access the network, so any packages we
706708
# need must be included in the VM.
@@ -1101,6 +1103,9 @@ in
11011103
# The (almost) simplest partitioning scheme: a swap partition and
11021104
# one big filesystem partition.
11031105
simple = makeInstallerTest "simple" simple-test-config;
1106+
lix-simple = makeInstallerTest "simple" simple-test-config // {
1107+
selectNixPackage = pkgs: pkgs.lix;
1108+
};
11041109

11051110
switchToFlake = makeInstallerTest "switch-to-flake" simple-test-config-flake;
11061111

pkgs/tools/package-management/lix/common-lix.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ stdenv.mkDerivation (finalAttrs: {
351351
inherit aws-sdk-cpp boehmgc;
352352
tests = {
353353
misc = nixosTests.nix-misc.lix;
354+
installer = nixosTests.installer.lix-simple;
354355
};
355356
};
356357

0 commit comments

Comments
 (0)