1{ config, lib, pkgs, ... }:
2
3let
4 cfg = config.hardware.keyboard.qmk;
5 inherit (lib) mdDoc mkEnableOption mkIf;
6
7in
8{
9 options.hardware.keyboard.qmk = {
10 enable = mkEnableOption (mdDoc "non-root access to the firmware of QMK keyboards");
11 };
12
13 config = mkIf cfg.enable {
14 services.udev.packages = [ pkgs.qmk-udev-rules ];
15 };
16}