nixosTest: Provide system.build.networkConfig

Changed files
+11 -4
nixos
+11 -4
nixos/lib/build-vms.nix
···
prefixLength = 24;
} ];
});
-
in
-
{ key = "ip-address";
-
config =
+
+
networkConfig =
{ networking.hostName = mkDefault m.fst;
networking.interfaces = listToAttrs interfaces;
···
in flip concatMap interfacesNumbered
({ 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)
] );