diff options
| author | Wael Nasreddine <wael.nasreddine@gmail.com> | 2021-08-18 21:07:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-18 21:07:04 -0700 |
| commit | c7315b77efd33429f432117a98c2ba958f088cfa (patch) | |
| tree | 4bcc4b70299b8dd35a21cf60532b0845ee44d2cf | |
| parent | Merge pull request #134299 from NixOS/backport-124942-to-release-21.05 (diff) | |
| parent | config.hardware.onlykey: update the udev rules for onlykey (diff) | |
| download | nixpkgs-c7315b77efd33429f432117a98c2ba958f088cfa.tar.gz | |
Merge pull request #134759 from NixOS/backport-124815-to-release-21.05
[Backport release-21.05] config.hardware.onlykey: update the udev rules for onlykey
| -rw-r--r-- | nixos/modules/hardware/onlykey.udev | 4 | ||||
| -rw-r--r-- | nixos/modules/hardware/onlykey/default.nix (renamed from nixos/modules/hardware/onlykey.nix) | 0 | ||||
| -rw-r--r-- | nixos/modules/hardware/onlykey/onlykey.udev | 18 | ||||
| -rw-r--r-- | nixos/modules/module-list.nix | 2 |
4 files changed, 19 insertions, 5 deletions
diff --git a/nixos/modules/hardware/onlykey.udev b/nixos/modules/hardware/onlykey.udev deleted file mode 100644 index 6583530e5684..000000000000 --- a/nixos/modules/hardware/onlykey.udev +++ /dev/null @@ -1,4 +0,0 @@ -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]?", GROUP+="plugdev" -KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", GROUP+="plugdev" diff --git a/nixos/modules/hardware/onlykey.nix b/nixos/modules/hardware/onlykey/default.nix index 07358c8a8782..07358c8a8782 100644 --- a/nixos/modules/hardware/onlykey.nix +++ b/nixos/modules/hardware/onlykey/default.nix diff --git a/nixos/modules/hardware/onlykey/onlykey.udev b/nixos/modules/hardware/onlykey/onlykey.udev new file mode 100644 index 000000000000..61e3ee4e8828 --- /dev/null +++ b/nixos/modules/hardware/onlykey/onlykey.udev @@ -0,0 +1,18 @@ +# UDEV Rules for OnlyKey, https://docs.crp.to/linux.html +ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", ENV{MTP_NO_PROBE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", MODE:="0666" +KERNEL=="ttyACM*", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", MODE:="0666" + + +# The udev rules were updated upstream without an explanation as you can +# see in [this comment][commit]. Assuming that hey have changed the +# idVendor/idProduct, I've kept the old values. +# TODO: Contact them upstream. +# +# [commit]: https://github.com/trustcrypto/trustcrypto.github.io/commit/0bcf928adaea559e75efa02ebd1040f0a15f611d +# +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]?", GROUP+="plugdev" +KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", GROUP+="plugdev" diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 7910e47ca0c9..6fdec6430968 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -70,7 +70,7 @@ ./hardware/tuxedo-keyboard.nix ./hardware/ubertooth.nix ./hardware/usb-wwan.nix - ./hardware/onlykey.nix + ./hardware/onlykey/default.nix ./hardware/opentabletdriver.nix ./hardware/sata.nix ./hardware/wooting.nix |
