about summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-04-06 20:18:23 +0200
committerene <ene@sils.li>2023-04-07 10:56:40 +0200
commit9550c96ac9a472b371820264a80d9bb536067c48 (patch)
tree0a75dedd8e7636c45b8c7a541008c350cc0cb399 /system
parentFix(system/users): Actually create plugdev group (diff)
downloadnixos-config-9550c96ac9a472b371820264a80d9bb536067c48.tar.gz
nixos-config-9550c96ac9a472b371820264a80d9bb536067c48.zip
Fix(system/hardware): Use different Udev rules
These are promoted by zsa on their github wiki. It works for me
while the provided ones, i.e. from the dist folder in the connected
repository, don't work.
Diffstat (limited to 'system')
-rw-r--r--system/hardware/default.nix29
1 files changed, 28 insertions, 1 deletions
diff --git a/system/hardware/default.nix b/system/hardware/default.nix
index 89f86551..ed97e178 100644
--- a/system/hardware/default.nix
+++ b/system/hardware/default.nix
@@ -4,7 +4,7 @@
   ...
 }: {
   hardware = {
-    keyboard.zsa.enable = true;
+    keyboard.zsa.enable = false;
     onlykey.enable = true;
     opengl = {
       enable = true;
@@ -17,6 +17,33 @@
       };
     };
   };
+  services.udev.extraRules =
+      ''
+        # Rules for Oryx web flashing and live training
+KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
+KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
+
+# Legacy rules for live training over webusb (Not needed for firmware v21+)
+  # Rule for all ZSA keyboards
+  SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev"
+  # Rule for the Moonlander
+  SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev"
+  # Rule for the Ergodox EZ
+  SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev"
+  # Rule for the Planck EZ
+  SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev"
+
+# Wally Flashing rules for the Ergodox EZ
+ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
+ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
+KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
+
+# Wally Flashing rules for the Moonlander and Planck EZ
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", \
+    MODE:="0666", \
+    SYMLINK+="stm32_dfu"
+      '';
 }
 # vim: ts=2