feat(hardware): add SoloKeys udev rules

This commit is contained in:
Felix Schröter 2023-09-29 14:10:29 +02:00
parent 333adf959e
commit 701e7ee70f
Signed by: felschr
GPG key ID: 671E39E6744C807D
2 changed files with 26 additions and 1 deletions

View file

@ -1,7 +1,7 @@
{ lib, pkgs, ... }:
{
imports = [ ./firmware.nix ./zsa.nix ];
imports = [ ./firmware.nix ./solokeys.nix ./zsa.nix ];
boot.supportedFilesystems = lib.mkDefault [ "btrfs" ];
boot.kernelPackages = lib.mkOverride 800 pkgs.linuxPackages_latest;

25
hardware/solokeys.nix Normal file
View file

@ -0,0 +1,25 @@
_:
{
services.udev.extraRules = ''
# Notify ModemManager this device should be ignored
ACTION!="add|change|move", GOTO="mm_usb_device_blacklist_end"
SUBSYSTEM!="usb", GOTO="mm_usb_device_blacklist_end"
ENV{DEVTYPE}!="usb_device", GOTO="mm_usb_device_blacklist_end"
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a2ca", ENV{ID_MM_DEVICE_IGNORE}="1"
LABEL="mm_usb_device_blacklist_end"
# Solo bootloader + firmware access
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a2ca", TAG+="uaccess"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a2ca", TAG+="uaccess"
# ST DFU access
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
# U2F Zero
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8acf", TAG+="uaccess"
'';
}