nixos/testing: Add support for specialArgs

Since using flakes disallows the usage of <unstable> (which I use in
some tests), this adds an alternative. By setting specialArgs, all VMs
can get the `unstable` flake input as an arg. This is not possible with
extraConfigurations, as that would lead to infinite recursions.
This commit is contained in:
Janne Heß
2020-06-02 16:27:07 +02:00
parent 5457fc7c76
commit 9f33ab62d9
2 changed files with 8 additions and 4 deletions

View File

@@ -3,8 +3,10 @@
minimal ? false
, # Ignored
config ? null
# Nixpkgs, for qemu, lib and more
, pkgs
, # Nixpkgs, for qemu, lib and more
pkgs
, # !!! See comment about args in lib/modules.nix
specialArgs ? {}
, # NixOS configuration to add to the VMs
extraConfigurations ? []
}:
@@ -31,7 +33,7 @@ rec {
nodes: configurations:
import ./eval-config.nix {
inherit system;
inherit system specialArgs;
modules = configurations ++ extraConfigurations;
baseModules = (import ../modules/module-list.nix) ++
[ ../modules/virtualisation/qemu-vm.nix