2019-02-26 13:44:40 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2019-03-20 02:57:59 +01:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
mkIf (elem "udev" config.machine.services) {
|
2019-02-26 13:44:40 +01:00
|
|
|
services.udev.extraRules = ''
|
|
|
|
Valve USB devices
|
|
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
|
|
|
# Steam Controller udev write access
|
|
|
|
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
|
|
|
# Valve HID devices over USB hidraw
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
|
|
|
# Valve HID devices over bluetooth hidraw
|
|
|
|
KERNEL=="hidraw*", KERNELS=="*28DE:*", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
|
|
|
# DualShock 4 over USB hidraw
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
|
|
|
# DualShock 4 wireless adapter over USB hidraw
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
|
|
|
# DualShock 4 Slim over USB hidraw
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
|
|
|
# DualShock 4 over bluetooth hidraw
|
|
|
|
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
|
|
|
|
# DualShock 4 Slim over bluetooth hidraw
|
|
|
|
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", TAG+="uaccess", TAG+="udev-acl"
|
|
|
|
'';
|
|
|
|
}
|