Configuration is now held by the `.org` files. All `.nix` files are tangled from the org-mode files.
1.2 KiB
1.2 KiB
Corne Keyboard
Corne Keyboard
I use a Corne (crkbd), a small split ergonomic keyboard, flashed with
Vial, a QMK-based firmware that lets me remap keys live from a GUI
instead of having to reflash the keyboard every time I want to tweak
my layout. Here’s the skeleton of the nixos.corne module.
{
flake.modules.nixos.corne = {
<<udev-rule>>
};
}
Granting HID Access
By default, the hidraw device nodes created for the keyboard are only
accessible to root, which means Vial can’t talk to it without running
as root too. Instead, I add a udev rule matching my keyboard’s Vial
identifier (the part after vial: is the keyboard’s unique unlock ID,
burned into its firmware) and grant the users group read/write access
to it, tagging it for uaccess / udev-acl so it’s also picked up by the
logged-in session’s ACLs.
services.udev = {
extraRules = ''
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
};