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