about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2022-01-20T14·28-0500
committergrfn <grfn@gws.fyi>2022-01-20T14·32+0000
commitf30e04da466a91be879f15bba142cb20fceb995d (patch)
treed92ac8ead94b0b91b37c8ec4d03c5ac2521c1e3b
parent7873806218f3ca06ad599cf1693848db6599415c (diff)
feat(grfn/system): Always add teensy udev rules r/3648
Basically any system I have is going to want to be able to flash an
ergodox, so it makes sense to have these always present

Change-Id: I88f556d4484e282e712062a488321bf80baa87ac
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5028
Reviewed-by: grfn <grfn@gws.fyi>
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
-rw-r--r--users/grfn/system/system/modules/common.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/users/grfn/system/system/modules/common.nix b/users/grfn/system/system/modules/common.nix
index 6a8cce7d9642..91723973f5cd 100644
--- a/users/grfn/system/system/modules/common.nix
+++ b/users/grfn/system/system/modules/common.nix
@@ -76,4 +76,12 @@ with lib;
   ];
 
   services.pcscd.enable = true;
+
+  services.udev.extraRules = ''
+    # UDEV rules for Teensy USB devices
+    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"
+  '';
 }