forked from mirrors/nixpkgs
nixosTest: Provide system.build.networkConfig
This commit is contained in:
parent
c7fd252d32
commit
c247827654
1 changed files with 11 additions and 4 deletions
|
@ -68,9 +68,8 @@ rec {
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
} ];
|
} ];
|
||||||
});
|
});
|
||||||
in
|
|
||||||
{ key = "ip-address";
|
networkConfig =
|
||||||
config =
|
|
||||||
{ networking.hostName = mkDefault m.fst;
|
{ networking.hostName = mkDefault m.fst;
|
||||||
|
|
||||||
networking.interfaces = listToAttrs interfaces;
|
networking.interfaces = listToAttrs interfaces;
|
||||||
|
@ -96,7 +95,15 @@ rec {
|
||||||
in flip concatMap interfacesNumbered
|
in flip concatMap interfacesNumbered
|
||||||
({ fst, snd }: qemu-common.qemuNICFlags snd fst m.snd);
|
({ fst, snd }: qemu-common.qemuNICFlags snd fst m.snd);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
in
|
||||||
|
{ key = "ip-address";
|
||||||
|
config = networkConfig // {
|
||||||
|
# Expose the networkConfig items for tests like nixops
|
||||||
|
# that need to recreate the network config.
|
||||||
|
system.build.networkConfig = networkConfig;
|
||||||
|
};
|
||||||
|
}
|
||||||
)
|
)
|
||||||
(getAttr m.fst nodes)
|
(getAttr m.fst nodes)
|
||||||
] );
|
] );
|
||||||
|
|
Loading…
Add table
Reference in a new issue