mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
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:
parent
5457fc7c76
commit
9f33ab62d9
@ -3,8 +3,10 @@
|
|||||||
minimal ? false
|
minimal ? false
|
||||||
, # Ignored
|
, # Ignored
|
||||||
config ? null
|
config ? null
|
||||||
# Nixpkgs, for qemu, lib and more
|
, # Nixpkgs, for qemu, lib and more
|
||||||
, pkgs
|
pkgs
|
||||||
|
, # !!! See comment about args in lib/modules.nix
|
||||||
|
specialArgs ? {}
|
||||||
, # NixOS configuration to add to the VMs
|
, # NixOS configuration to add to the VMs
|
||||||
extraConfigurations ? []
|
extraConfigurations ? []
|
||||||
}:
|
}:
|
||||||
@ -31,7 +33,7 @@ rec {
|
|||||||
nodes: configurations:
|
nodes: configurations:
|
||||||
|
|
||||||
import ./eval-config.nix {
|
import ./eval-config.nix {
|
||||||
inherit system;
|
inherit system specialArgs;
|
||||||
modules = configurations ++ extraConfigurations;
|
modules = configurations ++ extraConfigurations;
|
||||||
baseModules = (import ../modules/module-list.nix) ++
|
baseModules = (import ../modules/module-list.nix) ++
|
||||||
[ ../modules/virtualisation/qemu-vm.nix
|
[ ../modules/virtualisation/qemu-vm.nix
|
||||||
|
@ -4,10 +4,12 @@
|
|||||||
, minimal ? false
|
, minimal ? false
|
||||||
# Ignored
|
# Ignored
|
||||||
, config ? {}
|
, config ? {}
|
||||||
|
# !!! See comment about args in lib/modules.nix
|
||||||
|
, specialArgs ? {}
|
||||||
# Modules to add to each VM
|
# Modules to add to each VM
|
||||||
, extraConfigurations ? [] }:
|
, extraConfigurations ? [] }:
|
||||||
|
|
||||||
with import ./build-vms.nix { inherit system pkgs minimal extraConfigurations; };
|
with import ./build-vms.nix { inherit system pkgs minimal specialArgs extraConfigurations; };
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
Loading…
Reference in New Issue
Block a user