From 62675aa0cf1e98eb8caa66175f67378a0caf18b5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 27 May 2010 13:43:16 +0000 Subject: [PATCH] * Doh, forgot to commit. svn path=/nixos/trunk/; revision=22005 --- lib/build-vms.nix | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/build-vms.nix b/lib/build-vms.nix index a32e1448939..d52aefdf6b0 100644 --- a/lib/build-vms.nix +++ b/lib/build-vms.nix @@ -3,6 +3,7 @@ let pkgs = import nixpkgs { config = {}; inherit system; }; in with pkgs; +with import ../lib/qemu-flags.nix; rec { @@ -106,18 +107,8 @@ rec { "${config.networking.hostName}\n")); virtualisation.qemu.options = - lib.flip lib.concatMapStrings interfacesNumbered ({ first, second }: - "-net nic,vlan=${toString second},model=virtio " + - # Use 232.0.1. as the multicast address to - # connect VMs on the same vlan, but allow it to - # be overriden using the $QEMU_MCAST_ADDR_ - # environment variable. The test driver sets - # this variable to prevent collisions between - # parallel builds. - "-net socket,vlan=${toString second},mcast=" + - "\${QEMU_MCAST_ADDR_${toString first}:-232.0.1.${toString first}:1234} " - ); - + lib.flip lib.concatMapStrings interfacesNumbered + ({ first, second }: qemuNICFlags second first ); }; } ) @@ -126,7 +117,7 @@ rec { in lib.listToAttrs nodes_; - + # Zip two lists together. Should be moved to pkgs.lib. zip = xs: ys: if xs != [] && ys != [] then