@ -53,11 +53,14 @@ rec {
buildVM =
nodes : configuration :
nodes : configurations :
import " ${ nixos } / l i b / e v a l - c o n f i g . n i x " {
inherit nixpkgs services system ;
modules = [ configuration ] ;
modules = configurations ++ [
" ${ nixos } / m o d u l e s / v i r t u a l i s a t i o n / q e m u - v m . n i x " # !!!
" ${ nixos } / m o d u l e s / t e s t i n g / t e s t - i n s t r u m e n t a t i o n . n i x " # !!! should only get added for automated test runs
] ;
extraArgs = { inherit nodes ; } ;
/* ! ! ! b u g i n t h e m o d u l e / o p t i o n h a n d l i n g : t h i s i g n o r e s t h e
config from assignIPAddresses . Too much magic .
@ -88,13 +91,8 @@ rec {
# Generate a /etc/hosts file.
hosts = lib . concatMapStrings ( m : " ${ m . second } ${ m . first } \n " ) machinesWithIP ;
nodes_ = map ( m : lib . nameValuePair m . first
{ imports = [
( lib . getAttr m . first nodes )
" ${ nixos } / m o d u l e s / v i r t u a l i s a t i o n / q e m u - v m . n i x " # !!!
" ${ nixos } / m o d u l e s / t e s t i n g / t e s t - i n s t r u m e n t a t i o n . n i x " # !!! should only get added for automated test runs
] ;
config =
nodes_ = map ( m : lib . nameValuePair m . first [
{ config =
{ networking . hostName = m . first ;
networking . interfaces =
[ { name = " e t h 1 " ;
@ -105,7 +103,8 @@ rec {
services . nixosManual . enable = false ; # !!!
} ;
}
) machinesWithIP ;
( lib . getAttr m . first nodes )
] ) machinesWithIP ;
in lib . listToAttrs nodes_ ;