1 { config, pkgs, lib, ... }:
3 options.virtualisation.spiceUSBRedirection.enable = lib.mkOption {
7 Install the SPICE USB redirection helper with setuid
8 privileges. This allows unprivileged users to pass USB devices
9 connected to this machine to libvirt VMs, both local and
10 remote. Note that this allows users arbitrary access to USB
15 config = lib.mkIf config.virtualisation.spiceUSBRedirection.enable {
16 environment.systemPackages = [ pkgs.spice-gtk ]; # For polkit actions
17 security.wrappers.spice-client-glib-usb-acl-helper = {
20 capabilities = "cap_fowner+ep";
21 source = "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper";
25 meta.maintainers = [ ];