diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2022-02-06 16:37:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-06 16:37:00 +0100 |
commit | 189f73465b9b1c7534e28e327283c4cdd34ddf41 (patch) | |
tree | e0cf59a4c2c5aa1264631988f555fd1323d75f9b | |
parent | 788ad762b0c285b041b31828b05ab1fd4e6decea (diff) | |
parent | 56109be38bb159fe5dcb0dc7d8878577c69c9389 (diff) |
Merge pull request #158327 from babbaj/virtio-keyboard-option
nixos/qemu-vm: Create option for virtio-keyboard device
-rw-r--r-- | nixos/modules/virtualisation/qemu-vm.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 29e3aa024dfab..5143893589470 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -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" ]) |