2019-05-09 18:28:40 +02:00
|
|
|
{ config, lib, ... }:
|
2019-02-26 13:44:40 +01:00
|
|
|
|
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 = ''
|
2019-05-09 18:28:40 +02:00
|
|
|
# Valve USB devices
|
|
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-05-09 18:28:40 +02:00
|
|
|
# Steam Controller udev write access
|
|
|
|
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-05-09 18:28:40 +02:00
|
|
|
# Valve HID devices over USB hidraw
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-05-09 18:28:40 +02:00
|
|
|
# Valve HID devices over bluetooth hidraw
|
|
|
|
KERNEL=="hidraw*", KERNELS=="*28DE:*", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-05-09 18:28:40 +02:00
|
|
|
# DualShock 4 over USB hidraw
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-05-09 18:28:40 +02:00
|
|
|
# DualShock 4 wireless adapter over USB hidraw
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-05-09 18:28:40 +02:00
|
|
|
# DualShock 4 Slim over USB hidraw
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-05-09 18:28:40 +02:00
|
|
|
# DualShock 4 over bluetooth hidraw
|
|
|
|
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-05-09 18:28:40 +02:00
|
|
|
# DualShock 4 Slim over bluetooth hidraw
|
|
|
|
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", TAG+="uaccess", TAG+="udev-acl"
|
2019-02-26 13:44:40 +01:00
|
|
|
'';
|
|
|
|
}
|