{ pkgs, ... }: # Host permissions for reverse engineering Turtle Beach Swarm II devices # (/mnt/hdd_01/dev/repos/openbeach-re/protocol/nixos/turtle-beach-re.nix). { # USB traffic capture (/dev/usbmonN), readable by the 'wireshark' group boot.kernelModules = [ "usbmon" ]; programs.wireshark = { enable = true; usbmon.enable = true; }; users.users.darman.extraGroups = [ "wireshark" ]; # Turtle Beach / ROCCAT devices (vendor 10f5): give the logged-in user access to # the raw USB device (QEMU passthrough) and hidraw nodes (our own tools). # Must sort before 73-seat-late.rules for uaccess to apply, hence not extraRules. services.udev.packages = [ (pkgs.writeTextDir "lib/udev/rules.d/70-turtle-beach.rules" '' SUBSYSTEM=="usb", ATTR{idVendor}=="10f5", TAG+="uaccess" KERNEL=="hidraw*", ATTRS{idVendor}=="10f5", TAG+="uaccess" '') ]; }