summaryrefslogtreecommitdiff
path: root/host/software
diff options
context:
space:
mode:
authorAdrian Kummerlaender2021-10-10 21:15:58 +0200
committerAdrian Kummerlaender2021-10-10 21:15:58 +0200
commitd7061cf25ffe3f6bebfc427a67e48365ea10a357 (patch)
tree46f5d9324ecf8d565912aa2802efd2fc26c57168 /host/software
parent4d8a06ee93efd6dd598fe37546423ffd65a5646c (diff)
downloadnixos_system-d7061cf25ffe3f6bebfc427a67e48365ea10a357.tar
nixos_system-d7061cf25ffe3f6bebfc427a67e48365ea10a357.tar.gz
nixos_system-d7061cf25ffe3f6bebfc427a67e48365ea10a357.tar.bz2
nixos_system-d7061cf25ffe3f6bebfc427a67e48365ea10a357.tar.lz
nixos_system-d7061cf25ffe3f6bebfc427a67e48365ea10a357.tar.xz
nixos_system-d7061cf25ffe3f6bebfc427a67e48365ea10a357.tar.zst
nixos_system-d7061cf25ffe3f6bebfc427a67e48365ea10a357.zip
Add optional udev rules for Teensy USB boards
Enables flashing as non-root
Diffstat (limited to 'host/software')
-rw-r--r--host/software/desktop/teensy.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/host/software/desktop/teensy.nix b/host/software/desktop/teensy.nix
new file mode 100644
index 0000000..461ad27
--- /dev/null
+++ b/host/software/desktop/teensy.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+{
+ services.udev.extraRules = ''
+ # UDEV rules for Teensy USB
+ 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"
+ '';
+}