module: Expose tests.bootCommands

Useful for e.g. interactive input during VM boot.
This commit is contained in:
Andrew Marshall authored and Felix Uhl committed 2024-11-20 07:19:25 +01:00
1 parent da52cf4020
commit feeb365e31
1 file changed
+9
+9
View File
@@ -153,6 +153,14 @@ in
};
tests = {
bootCommands = lib.mkOption {
description = ''
NixOS test script commands to run after the machine has started. Can
be used to enter an interactive password.
'';
type = lib.types.lines;
};
efi = lib.mkOption {
description = ''
Whether efi is enabled for the `system.build.installTest`.
@@ -226,6 +234,7 @@ in
name = "${config.networking.hostName}-disko";
disko-config = builtins.removeAttrs config [ "_module" ];
testMode = "direct";
bootCommands = cfg.tests.bootCommands;
efi = cfg.tests.efi;
extraSystemConfig = cfg.tests.extraConfig;
extraTestScript = cfg.tests.extraChecks;