module: add tests.extraChecks

This commit is contained in:
lassulus authored and mergify[bot] committed 2023-09-02 10:14:48 +00:00
1 parent 487a978e34
commit dd5cdd852c
1 file changed
+11
+11
View File
@@ -45,6 +45,16 @@ in
type = lib.types.bool;
default = config.boot.loader.systemd-boot.enable || config.boot.loader.grub.efiSupport;
};
extraChecks = lib.mkOption {
description = ''
extra checks to run in the `system.build.installTest`.
'';
type = lib.types.lines;
default = "";
example = ''
machine.succeed("test -e /var/secrets/my.secret")
'';
};
};
};
config = lib.mkIf (cfg.devices.disk != { }) {
@@ -60,6 +70,7 @@ in
disko-config = builtins.removeAttrs config [ "_module" ];
testMode = "direct";
efi = cfg.tests.efi;
extraTestScript = cfg.tests.extraChecks;
};
};