git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #124815 from kalbasit/fix-onlykey-udev-rule

config.hardware.onlykey: update the udev rules for onlykey

commit6816676a4573410c036500e399f409f57d2e184f authorWael Nasreddine <wael.nasreddine@gmail.com> dateWed 18 Aug 2021, 20:21 (5 years ago) parent62fe6c9eab36fa
4 files changed+19−5
nixos/modules/hardware/onlykey.udev−4 nixos/modules/hardware/onlykey.nix → nixos/modules/hardware/onlykey/default.nix nixos/modules/hardware/onlykey/onlykey.udev+18 nixos/modules/module-list.nix+1−1
nixos/modules/hardware/onlykey.udevdeleted−4
@@ -1,4 +0,0 @@
1−ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
2−ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
3−SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", GROUP+="plugdev"
4−KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", GROUP+="plugdev"
nixos/modules/hardware/onlykey.nix → nixos/modules/hardware/onlykey/default.nixrenamed

The content is the same.

nixos/modules/hardware/onlykey/onlykey.udevnew file+18
@@ -0,0 +1,18 @@
1+# UDEV Rules for OnlyKey, https://docs.crp.to/linux.html
2+ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", ENV{ID_MM_DEVICE_IGNORE}="1"
3+ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", ENV{MTP_NO_PROBE}="1"
4+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", MODE:="0666"
5+KERNEL=="ttyACM*", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", MODE:="0666"
6+
7+
8+# The udev rules were updated upstream without an explanation as you can
9+# see in [this comment][commit]. Assuming that hey have changed the
10+# idVendor/idProduct, I've kept the old values.
11+# TODO: Contact them upstream.
12+#
13+# [commit]: https://github.com/trustcrypto/trustcrypto.github.io/commit/0bcf928adaea559e75efa02ebd1040f0a15f611d
14+#
15+ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
16+ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
17+SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", GROUP+="plugdev"
18+KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", GROUP+="plugdev"
nixos/modules/module-list.nix+1−1
@@ -72,7 +72,7 @@
7272 ./hardware/tuxedo-keyboard.nix
7373 ./hardware/ubertooth.nix
7474 ./hardware/usb-wwan.nix
75− ./hardware/onlykey.nix
75+ ./hardware/onlykey/default.nix
7676 ./hardware/opentabletdriver.nix
7777 ./hardware/sata.nix
7878 ./hardware/wooting.nix