1 # A module containing the base imports and overrides that
2 # are always applied in NixOS VM tests, unconditionally,
3 # even in `inheritParentConfig = false` specialisations.
6 inherit (lib) mkDefault mkForce;
10 ../../modules/virtualisation/qemu-vm.nix
11 ../../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs
12 { key = "no-manual"; documentation.nixos.enable = false; }
15 # Make the revision metadata constant, in order to avoid needless retesting.
16 # The human version (e.g. 21.05-pre) is left as is, because it is useful
17 # for external modules that test with e.g. testers.nixosTest and rely on that
19 config.system.nixos = {
20 revision = mkForce "constant-nixos-revision";
21 versionSuffix = mkForce "test";
22 label = mkForce "test";
26 # Don't pull in switch-to-configuration by default, except when specialisations or early boot shenanigans are involved.
27 # This is mostly a Hydra optimization, so we don't rebuild all the tests every time switch-to-configuration-ng changes.
28 key = "no-switch-to-configuration";
29 system.switch.enable = mkDefault (config.isSpecialisation || config.specialisation != {} || config.virtualisation.installBootLoader);