summaryrefslogtreecommitdiffstats
path: root/nixos/lib/qemu-flags.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-10 13:28:20 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-10 13:28:20 +0200
commit5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010 (patch)
treea6c0f605be6de3f372ae69905b331f9f75452da7 /nixos/lib/qemu-flags.nix
parent6070bc016bd2fd945b04347e25cfd3738622d2ac (diff)
Move all of NixOS to nixos/ in preparation of the repository merge
Diffstat (limited to 'nixos/lib/qemu-flags.nix')
-rw-r--r--nixos/lib/qemu-flags.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix
new file mode 100644
index 000000000000..de355b08918c
--- /dev/null
+++ b/nixos/lib/qemu-flags.nix
@@ -0,0 +1,10 @@
+# QEMU flags shared between various Nix expressions.
+
+{
+
+ 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}"
+ ];
+
+}