mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 20:39:04 +02:00
Merge pull request #158327 from babbaj/virtio-keyboard-option
nixos/qemu-vm: Create option for virtio-keyboard device
This commit is contained in:
commit
189f73465b
|
@ -632,6 +632,15 @@ in
|
||||||
Enable the Qemu guest agent.
|
Enable the Qemu guest agent.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtioKeyboard =
|
||||||
|
mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Enable the virtio-keyboard device.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.useNixStoreImage =
|
virtualisation.useNixStoreImage =
|
||||||
|
@ -835,7 +844,9 @@ in
|
||||||
|
|
||||||
# FIXME: Consolidate this one day.
|
# FIXME: Consolidate this one day.
|
||||||
virtualisation.qemu.options = mkMerge [
|
virtualisation.qemu.options = mkMerge [
|
||||||
[ "-device virtio-keyboard" ]
|
(mkIf cfg.qemu.virtioKeyboard [
|
||||||
|
"-device virtio-keyboard"
|
||||||
|
])
|
||||||
(mkIf pkgs.stdenv.hostPlatform.isx86 [
|
(mkIf pkgs.stdenv.hostPlatform.isx86 [
|
||||||
"-usb" "-device usb-tablet,bus=usb-bus.0"
|
"-usb" "-device usb-tablet,bus=usb-bus.0"
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in a new issue