Files
nixconfig/modules/nixos/vial.nix
T

14 lines
625 B
Nix

{ config, lib, pkgs, ... }:
{
# Vial-capable keyboards (lily58 pro r2g) expose a second, non-keyboard raw
# HID interface that vial.rocks drives over WebHID. Its /dev/hidraw* node is
# root-only by default, so chromium cannot open the device without this rule.
services.udev.extraRules = ''
# Vial firmware advertises itself through a magic USB serial, so this
# matches any vial board rather than just the lily58. uaccess hands the
# device to whoever owns the active seat, no group membership needed.
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", TAG+="uaccess"
'';
}