* Make virtualisation.qemu.options a list.

svn path=/nixos/trunk/; revision=28120
This commit is contained in:
Eelco Dolstra 2011-08-02 06:52:10 +00:00
parent d890e74d9c
commit 8aad8c536f
3 changed files with 10 additions and 7 deletions

View File

@ -76,7 +76,7 @@ rec {
"${config.networking.hostName}\n")); "${config.networking.hostName}\n"));
virtualisation.qemu.options = virtualisation.qemu.options =
lib.flip lib.concatMapStrings interfacesNumbered lib.flip map interfacesNumbered
({ first, second }: qemuNICFlags second first m.second); ({ first, second }: qemuNICFlags second first m.second);
}; };
} }

View File

@ -3,7 +3,8 @@
{ {
qemuNICFlags = nic: net: machine: qemuNICFlags = nic: net: machine:
"-net nic,vlan=${toString nic},macaddr=52:54:00:12:${toString net}:${toString machine},model=virtio " + [ "-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} "; "-net vde,vlan=${toString nic},sock=$QEMU_VDE_SOCKET_${toString net}"
];
} }

View File

@ -109,8 +109,8 @@ let
virtualisation.qemu.options = virtualisation.qemu.options =
mkOption { mkOption {
default = ""; default = [];
example = "-vga std"; example = [ "-vga std" ];
description = "Options passed to QEMU."; description = "Options passed to QEMU.";
}; };
@ -173,8 +173,8 @@ let
-append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo} ${kernelConsole} $QEMU_KERNEL_PARAMS" \ -append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo} ${kernelConsole} $QEMU_KERNEL_PARAMS" \
''} \ ''} \
${qemuGraphics} \ ${qemuGraphics} \
$QEMU_OPTS \ ${toString config.virtualisation.qemu.options} \
${config.virtualisation.qemu.options} $QEMU_OPTS
''; '';
@ -297,6 +297,8 @@ in
''; '';
virtualisation.pathsInNixDB = [ config.system.build.toplevel ]; virtualisation.pathsInNixDB = [ config.system.build.toplevel ];
virtualisation.qemu.options = [ "-usbdevice tablet" ];
# Mount the host filesystem via CIFS, and bind-mount the Nix store # Mount the host filesystem via CIFS, and bind-mount the Nix store
# of the host into our own filesystem. We use mkOverride to allow # of the host into our own filesystem. We use mkOverride to allow