diff options
author | Peter Hoeg | 2023-02-15 11:33:56 +0800 |
---|---|---|
committer | Peter Hoeg | 2023-02-15 11:33:56 +0800 |
commit | 2a97c0d985791d4d3edce9d8432db983a6905203 (patch) | |
tree | ffad3763a7a150804ab519d8f9329957f3163f48 /nixos/modules/hardware/keyboard | |
parent | 774254a723754c3caa7fda07d98df8ca96f0e4ed (diff) |
nixos/hardware: add support for qmk keyboards
Diffstat (limited to 'nixos/modules/hardware/keyboard')
-rw-r--r-- | nixos/modules/hardware/keyboard/qmk.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/modules/hardware/keyboard/qmk.nix b/nixos/modules/hardware/keyboard/qmk.nix new file mode 100644 index 000000000000..df3bcaeccd2e --- /dev/null +++ b/nixos/modules/hardware/keyboard/qmk.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.keyboard.qmk; + inherit (lib) mdDoc mkEnableOption mkIf; + +in +{ + options.hardware.keyboard.qmk = { + enable = mkEnableOption (mdDoc "non-root access to the firmware of QMK keyboards"); + }; + + config = mkIf cfg.enable { + services.udev.packages = [ pkgs.qmk-udev-rules ]; + }; +} |