mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01: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
1 changed files with 12 additions and 1 deletions
|
@ -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 a new issue