2023-03-04 12:14:45 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.hardware.keyboard.qmk;
|
2024-04-21 15:54:59 +00:00
|
|
|
inherit (lib) mkEnableOption mkIf;
|
2023-03-04 12:14:45 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.hardware.keyboard.qmk = {
|
2024-04-21 15:54:59 +00:00
|
|
|
enable = mkEnableOption "non-root access to the firmware of QMK keyboards";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.udev.packages = [ pkgs.qmk-udev-rules ];
|
2024-01-02 11:29:13 +00:00
|
|
|
users.groups.plugdev = {};
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
}
|