summaryrefslogtreecommitdiffstats
path: root/nixos/lib/build-vms.nix
diff options
context:
space:
mode:
authorArian van Putten <aeroboy94@gmail.com>2019-05-26 00:15:10 +0200
committerArian van Putten <aeroboy94@gmail.com>2019-05-26 00:20:21 +0200
commitd50b43423455ac06f3e237dbc0a0c98bcb4b5dcf (patch)
tree93a40ccd502265a172be0dcb08db0cc08a136f33 /nixos/lib/build-vms.nix
parentfcd012eed69bb05c387011b91ee6631354d0b59e (diff)
nixos: Make 'nesting.clone' work in NixOS tests
Because nesting.clone calls 'eval-config.nix' manually, without the 'extraArgs' argument that provides the 'nodes' argument to nixos modules in nixos tests, evaluating of 'nesting.clone' definitions would fail with the following error while evaluating the module argument `nodes' in "<redacted>" while evaluating the attribute '_module.args.nodes' at undefined position: attribute 'nodes' missing, at <redacted./nixpkgs/lib/modules.nix:163:28 by not using 'extraArgs' but a nixos module instead, the nodes parameter gets propagated to the 'eval-config.nix' call that 'nesting.clone' makes too - getting rid of the error. See https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/activation/top-level.nix#L13-L23 See https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/build-vms.nix#L27 See https://github.com/NixOS/nixpkgs/issues/20886#issuecomment-495952149
Diffstat (limited to 'nixos/lib/build-vms.nix')
-rw-r--r--nixos/lib/build-vms.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix
index a5580f4712eb..ba8e13b431a0 100644
--- a/nixos/lib/build-vms.nix
+++ b/nixos/lib/build-vms.nix
@@ -37,9 +37,9 @@ rec {
../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;
- extraArgs = { inherit nodes; };
};