summary refs log tree commit diff
path: root/nixos/lib/build-vms.nix
diff options
context:
space:
mode:
authorArian van Putten <aeroboy94@gmail.com>2019-05-26 00:52:52 +0200
committerArian van Putten <aeroboy94@gmail.com>2019-05-29 12:50:49 +0200
commitcbc45b5981f26c80e7d78e9525373b1388b7e516 (patch)
tree1a6afa5224b652882b22ef23c7c81c992dab0364 /nixos/lib/build-vms.nix
parenta48047a755047b34471a740dffa07744221d63c2 (diff)
downloadnixpkgs-cbc45b5981f26c80e7d78e9525373b1388b7e516.tar
nixpkgs-cbc45b5981f26c80e7d78e9525373b1388b7e516.tar.gz
nixpkgs-cbc45b5981f26c80e7d78e9525373b1388b7e516.tar.bz2
nixpkgs-cbc45b5981f26c80e7d78e9525373b1388b7e516.tar.lz
nixpkgs-cbc45b5981f26c80e7d78e9525373b1388b7e516.tar.xz
nixpkgs-cbc45b5981f26c80e7d78e9525373b1388b7e516.tar.zst
nixpkgs-cbc45b5981f26c80e7d78e9525373b1388b7e516.zip
nixos: Make nesting.children work in NixOS tests
We differentiate between modules and baseModules in  the
VM builder for NixOS tests. This way, nesting.children, eventhough
it doesn't inherit from parent, still has enough config to
actually complete the test. Otherwise, the qemu modules
would not be loaded, for example, and a nesting.children
statement would not evaluate.
Diffstat (limited to 'nixos/lib/build-vms.nix')
-rw-r--r--nixos/lib/build-vms.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix
index ba8e13b431a..6c92aa1ffa2 100644
--- a/nixos/lib/build-vms.nix
+++ b/nixos/lib/build-vms.nix
@@ -32,14 +32,14 @@ rec {
 
     import ./eval-config.nix {
       inherit system;
-      modules = configurations ++
+      modules = configurations ++ extraConfigurations;
+      baseModules =  (import ../modules/module-list.nix) ++
         [ ../modules/virtualisation/qemu-vm.nix
           ../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs
           { key = "no-manual"; documentation.nixos.enable = false; }
           { key = "qemu"; system.build.qemu = qemu; }
           { key = "nodes"; _module.args.nodes = nodes; }
-        ] ++ optional minimal ../modules/testing/minimal-kernel.nix
-          ++ extraConfigurations;
+        ] ++ optional minimal ../modules/testing/minimal-kernel.nix;
     };