at 23.05-pre 521 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4let 5 cfg = config.hardware.keyboard.uhk; 6in 7{ 8 options.hardware.keyboard.uhk = { 9 enable = mkEnableOption (lib.mdDoc '' 10 non-root access to the firmware of UHK keyboards. 11 You need it when you want to flash a new firmware on the keyboard. 12 Access to the keyboard is granted to users in the "input" group. 13 You may want to install the uhk-agent package. 14 ''); 15 16 }; 17 18 config = mkIf cfg.enable { 19 services.udev.packages = [ pkgs.uhk-udev-rules ]; 20 }; 21}