chore(hardware): update ZSA udev rules

This commit is contained in:
Felix Schröter 2023-09-29 14:09:58 +02:00
parent 8ea848888a
commit 333adf959e
Signed by: felschr
GPG key ID: 671E39E6744C807D
3 changed files with 21 additions and 11 deletions

View file

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

View file

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
services.udev.extraRules = ''
# STM32 rules for the Planck EZ Standard / Glow
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", \
MODE:="0666", \
SYMLINK+="stm32_dfu"
'';
}

20
hardware/zsa.nix Normal file
View file

@ -0,0 +1,20 @@
_:
{
services.udev.extraRules = ''
# Rules for Oryx web flashing and live training
KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
# Wally Flashing rules for the Ergodox EZ
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"
# Keymapp / Wally Flashing rules for the Moonlander and Planck EZ
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu"
# Keymapp Flashing rules for the Voyager
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu"
'';
}