aboutsummaryrefslogtreecommitdiff
path: root/modules/services/wooting.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/wooting.nix')
-rw-r--r--modules/services/wooting.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/services/wooting.nix b/modules/services/wooting.nix
new file mode 100644
index 0000000..fdc6ba8
--- /dev/null
+++ b/modules/services/wooting.nix
@@ -0,0 +1,35 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+
+{
+ options.nx.services.wooting.enable = lib.mkEnableOption "Wootility service";
+ condition = config.services.udev.enable {
+ services.udev.extraRules = ''
+ # Wooting One Legacy
+ SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess"
+ SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess"
+
+ # Wooting One update mode
+ SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess"
+
+ # Wooting Two Legacy
+ SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess"
+ SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess"
+
+ # Wooting Two update mode
+ SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", TAG+="uaccess"
+
+ # Generic Wootings
+ SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="uaccess"
+ SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", TAG+="uaccess"
+ '';
+
+ environment.systemPackages = with pkgs; [
+ wootility
+ ];
+ };
+}