diff options
| author | schererleander <leander@schererleander.de> | 2025-04-29 20:36:46 +0200 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2025-04-29 20:36:46 +0200 |
| commit | ec0137a61d11c12cdef8e1dbd515315077be9c72 (patch) | |
| tree | 5ae14dc5130406569acc7e3e4c2d35ecff800aa9 /hosts/nixos/wooting.nix | |
| parent | 8342f3abaf4167aec9845c173e3325f4fc80a2c3 (diff) | |
move modules
Diffstat (limited to 'hosts/nixos/wooting.nix')
| -rw-r--r-- | hosts/nixos/wooting.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/hosts/nixos/wooting.nix b/hosts/nixos/wooting.nix new file mode 100644 index 0000000..eadfe9c --- /dev/null +++ b/hosts/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 + ]; + }; +} + |
