From 2a97c0d985791d4d3edce9d8432db983a6905203 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Wed, 15 Feb 2023 11:33:56 +0800 Subject: nixos/hardware: add support for qmk keyboards --- nixos/modules/hardware/keyboard/qmk.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 nixos/modules/hardware/keyboard/qmk.nix (limited to 'nixos/modules/hardware') 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 ]; + }; +} -- cgit 1.4.1