22 lines
639 B
Nix
22 lines
639 B
Nix
|
{pkgs, ...}: {
|
||
|
# Make udev rules to make PDP controller and Oculus Rift CV1 work
|
||
|
services.udev = let
|
||
|
oculusRules = pkgs.writeTextFile {
|
||
|
name = "10-oculus.rules";
|
||
|
text = ''
|
||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"
|
||
|
'';
|
||
|
destination = "/etc/udev/rules.d/10-oculus.rules";
|
||
|
};
|
||
|
pdpRules = pkgs.writeTextFile {
|
||
|
name = "10-pdp.rules";
|
||
|
text = ''
|
||
|
SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"
|
||
|
'';
|
||
|
destination = "/etc/udev/rules.d/10-pdp.rules";
|
||
|
};
|
||
|
in {
|
||
|
packages = [oculusRules pdpRules];
|
||
|
};
|
||
|
}
|