diff options
author | Janne Heß <janne@hess.ooo> | 2020-06-02 16:27:07 +0200 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2020-09-14 00:10:21 +0200 |
commit | 9f33ab62d99c98e3f5bddd64532f15f482cf01b2 (patch) | |
tree | c383d7daef78e2fc3b3ebb61f87d92e419d434ae /nixos/lib/build-vms.nix | |
parent | 5457fc7c76bd46a791ec02a52eebc274c9ce542f (diff) | |
download | nixlib-9f33ab62d99c98e3f5bddd64532f15f482cf01b2.tar nixlib-9f33ab62d99c98e3f5bddd64532f15f482cf01b2.tar.gz nixlib-9f33ab62d99c98e3f5bddd64532f15f482cf01b2.tar.bz2 nixlib-9f33ab62d99c98e3f5bddd64532f15f482cf01b2.tar.lz nixlib-9f33ab62d99c98e3f5bddd64532f15f482cf01b2.tar.xz nixlib-9f33ab62d99c98e3f5bddd64532f15f482cf01b2.tar.zst nixlib-9f33ab62d99c98e3f5bddd64532f15f482cf01b2.zip |
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.
Diffstat (limited to 'nixos/lib/build-vms.nix')
-rw-r--r-- | nixos/lib/build-vms.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix index 1bad63b9194c..b1575fc13bbd 100644 --- a/nixos/lib/build-vms.nix +++ b/nixos/lib/build-vms.nix @@ -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 |