* Make virtualisation.qemu.options a list.
svn path=/nixos/trunk/; revision=28120
This commit is contained in:
parent
d890e74d9c
commit
8aad8c536f
@ -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);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -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}"
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
@ -298,6 +298,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
|
||||||
# this module to be applied to "normal" NixOS system configuration,
|
# this module to be applied to "normal" NixOS system configuration,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user