aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschererleander <leander@schererleander.de>2025-11-05 18:21:47 +0100
committerschererleander <leander@schererleander.de>2025-11-06 19:40:41 +0100
commitbedd54e9348690f7e9112341f42b810722965ab9 (patch)
treeb971b593e840542d6907a5f90e896de4812ff76f
parentfbbe74303f6a1fe05748f6ff90ed30b092d11757 (diff)
move wooting module to services
-rw-r--r--hosts/adam/wooting.nix27
-rw-r--r--modules/services/default.nix1
-rw-r--r--modules/services/wooting.nix35
3 files changed, 36 insertions, 27 deletions
diff --git a/hosts/adam/wooting.nix b/hosts/adam/wooting.nix
deleted file mode 100644
index 742ef29..0000000
--- a/hosts/adam/wooting.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ pkgs, ... }:
-
-{
- 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
- ];
-}
diff --git a/modules/services/default.nix b/modules/services/default.nix
index 11edc80..8d76c9e 100644
--- a/modules/services/default.nix
+++ b/modules/services/default.nix
@@ -7,5 +7,6 @@
./pipewire.nix
./mullvad.nix
./nextcloud-client.nix
+ ./wooting.nix
];
}
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
+ ];
+ };
+}