1{ config, lib, pkgs, ... }:
2
3let
4 cfg = config.hardware.keyboard.qmk;
5 inherit (lib) mkEnableOption mkIf;
6
7in
8{
9 options.hardware.keyboard.qmk = {
10 enable = mkEnableOption "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 users.groups.plugdev = {};
16 };
17}