···11+# A module containing the base imports and overrides that
22+# are always applied in NixOS VM tests, unconditionally,
33+# even in `inheritParentConfig = false` specialisations.
44+{ lib, ... }:
55+let
66+ inherit (lib) mkForce;
77+in
88+{
99+ imports = [
1010+ ../../modules/virtualisation/qemu-vm.nix
1111+ ../../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs
1212+ { key = "no-manual"; documentation.nixos.enable = false; }
1313+ {
1414+ key = "no-revision";
1515+ # Make the revision metadata constant, in order to avoid needless retesting.
1616+ # The human version (e.g. 21.05-pre) is left as is, because it is useful
1717+ # for external modules that test with e.g. testers.nixosTest and rely on that
1818+ # version number.
1919+ config.system.nixos.revision = mkForce "constant-nixos-revision";
2020+ }
2121+2222+ ];
2323+}
+1-12
nixos/lib/testing/nodes.nix
···1212 modules = [ config.defaults ];
1313 baseModules = (import ../../modules/module-list.nix) ++
1414 [
1515- ../../modules/virtualisation/qemu-vm.nix
1616- ../../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs
1717- { key = "no-manual"; documentation.nixos.enable = false; }
1818- {
1919- key = "no-revision";
2020- # Make the revision metadata constant, in order to avoid needless retesting.
2121- # The human version (e.g. 21.05-pre) is left as is, because it is useful
2222- # for external modules that test with e.g. testers.nixosTest and rely on that
2323- # version number.
2424- config.system.nixos.revision = mkForce "constant-nixos-revision";
2525- }
1515+ ./nixos-test-base.nix
2616 { key = "nodes"; _module.args.nodes = nodes; }
2727-2817 ({ config, ... }:
2918 {
3019 virtualisation.qemu.package = testModuleArgs.config.qemu.package;