aboutsummaryrefslogtreecommitdiff
path: root/modules/nixos/wooting.nix
diff options
context:
space:
mode:
authorschererleander <leander@schererleander.de>2025-04-29 16:59:25 +0200
committerschererleander <leander@schererleander.de>2025-04-29 16:59:25 +0200
commitdb88d50e8924cba8b424c0ea7546b81baccd9c5c (patch)
tree44b2b1082c587b47fb1f08d620ee707ddd4adf27 /modules/nixos/wooting.nix
parent539b3e2836e4e7177e65b3df10a4bfe68f9f4d23 (diff)
initial commit
Diffstat (limited to 'modules/nixos/wooting.nix')
-rw-r--r--modules/nixos/wooting.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/nixos/wooting.nix b/modules/nixos/wooting.nix
new file mode 100644
index 0000000..eadfe9c
--- /dev/null
+++ b/modules/nixos/wooting.nix
@@ -0,0 +1,34 @@
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.wooting;
+in {
+ options.wooting.enable = lib.mkEnableOption "Enable Wooting udev rules";
+
+ config = lib.mkIf cfg.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
+ ];
+ };
+}
+