From 98d2da68612215351263eae8729c150d10117086 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 21 Dec 2020 00:53:17 +0100 Subject: [PATCH] nixos-modules: set qemu options in hardware.nix --- nixos-modules/hardware/usb.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos-modules/hardware/usb.nix b/nixos-modules/hardware/usb.nix index c19e24c..167fdea 100644 --- a/nixos-modules/hardware/usb.nix +++ b/nixos-modules/hardware/usb.nix @@ -115,6 +115,11 @@ with lib; ''; }; + virtualisation.qemu.options = lib.optional cfg.enable + (lib.optional (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) "-usb" + ++ lib.optional (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) + "-device usb-ehci,id=usb0"); + }; }