nixpkgs/nixos/lib/qemu-flags.nix
Tuomas Tynkkynen 1ce1380497 nixos/qemu-flags: Take a 'pkgs' parameter
I'm gonna use it in the next commit.
2018-01-30 16:57:27 +02:00

12 lines
296 B
Nix

# QEMU flags shared between various Nix expressions.
{ pkgs }:
{
qemuNICFlags = nic: net: machine:
[ "-net nic,vlan=${toString nic},macaddr=52:54:00:12:${toString net}:${toString machine},model=virtio"
"-net vde,vlan=${toString nic},sock=$QEMU_VDE_SOCKET_${toString net}"
];
}