about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorMarek Mahut <marek.mahut@gmail.com>2019-10-31 10:48:48 +0100
committerGitHub <noreply@github.com>2019-10-31 10:48:48 +0100
commit392b12f2525d696e5f83c83cba37f8d45bf7de63 (patch)
tree7fd03159ddba70b58104716098c59ebda66bb5ce /nixos
parent0bbd890ea707b862dbb77e4f4b5ca7eee5dd3bad (diff)
parentd124858efebc9b027f271d75cc32523dca84485a (diff)
downloadnixlib-392b12f2525d696e5f83c83cba37f8d45bf7de63.tar
nixlib-392b12f2525d696e5f83c83cba37f8d45bf7de63.tar.gz
nixlib-392b12f2525d696e5f83c83cba37f8d45bf7de63.tar.bz2
nixlib-392b12f2525d696e5f83c83cba37f8d45bf7de63.tar.lz
nixlib-392b12f2525d696e5f83c83cba37f8d45bf7de63.tar.xz
nixlib-392b12f2525d696e5f83c83cba37f8d45bf7de63.tar.zst
nixlib-392b12f2525d696e5f83c83cba37f8d45bf7de63.zip
Merge pull request #72089 from prusnak/trezor-udev-rules
trezor-udev-rules: init at unstable-2019-07-17
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/hardware/trezord.nix15
1 files changed, 1 insertions, 14 deletions
diff --git a/nixos/modules/services/hardware/trezord.nix b/nixos/modules/services/hardware/trezord.nix
index 62824ed7350a..561106c41626 100644
--- a/nixos/modules/services/hardware/trezord.nix
+++ b/nixos/modules/services/hardware/trezord.nix
@@ -44,20 +44,7 @@ in {
   ### implementation
 
   config = mkIf cfg.enable {
-    services.udev.packages = lib.singleton (pkgs.writeTextFile {
-      name = "trezord-udev-rules";
-      destination = "/etc/udev/rules.d/51-trezor.rules";
-      text = ''
-        # TREZOR v1 (One)
-        SUBSYSTEM=="usb", ATTR{idVendor}=="534c", ATTR{idProduct}=="0001", MODE="0660", GROUP="trezord", TAG+="uaccess", SYMLINK+="trezor%n"
-        KERNEL=="hidraw*", ATTRS{idVendor}=="534c", ATTRS{idProduct}=="0001", MODE="0660", GROUP="trezord", TAG+="uaccess"
-
-        # TREZOR v2 (T)
-        SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c0", MODE="0660", GROUP="trezord", TAG+="uaccess", SYMLINK+="trezor%n"
-        SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c1", MODE="0660", GROUP="trezord", TAG+="uaccess", SYMLINK+="trezor%n"
-        KERNEL=="hidraw*", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="53c1", MODE="0660", GROUP="trezord", TAG+="uaccess"
-      '';
-    });
+    services.udev.packages = [ pkgs.trezor-udev-rules ];
 
     systemd.services.trezord = {
       description = "TREZOR Bridge";