mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 16:46:09 +00:00
77a4004df1
the web server somewhere, so put them back in (http://hydra.nixos.org/build/424923). svn path=/nixos/trunk/; revision=22003
16 lines
540 B
Nix
16 lines
540 B
Nix
# QEMU flags shared between various Nix expressions.
|
|
|
|
{
|
|
|
|
qemuNICFlags = nic: net:
|
|
"-net nic,vlan=${toString nic},model=virtio " +
|
|
# Use 232.0.1.<vlan> as the multicast address to connect VMs on
|
|
# the same vlan, but allow it to be overriden using the
|
|
# $QEMU_MCAST_ADDR_<vlan> environment variable. The test driver
|
|
# sets this variable to prevent collisions between parallel
|
|
# builds.
|
|
"-net socket,vlan=${toString nic},mcast=" +
|
|
"\${QEMU_MCAST_ADDR_${toString net}:-232.0.1.${toString net}:1234} ";
|
|
|
|
}
|