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.
|
||||
'';
|
||||
};
|
||||
|
||||
virtioKeyboard =
|
||||
mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Enable the virtio-keyboard device.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.useNixStoreImage =
|
||||
@ -835,7 +844,9 @@ in
|
||||
|
||||
# FIXME: Consolidate this one day.
|
||||
virtualisation.qemu.options = mkMerge [
|
||||
[ "-device virtio-keyboard" ]
|
||||
(mkIf cfg.qemu.virtioKeyboard [
|
||||
"-device virtio-keyboard"
|
||||
])
|
||||
(mkIf pkgs.stdenv.hostPlatform.isx86 [
|
||||
"-usb" "-device usb-tablet,bus=usb-bus.0"
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user