about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/hardware/keyboard/zsa.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/hardware/keyboard/zsa.nix')
-rw-r--r--nixpkgs/nixos/modules/hardware/keyboard/zsa.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/hardware/keyboard/zsa.nix b/nixpkgs/nixos/modules/hardware/keyboard/zsa.nix
new file mode 100644
index 000000000000..a04b67b5c8d0
--- /dev/null
+++ b/nixpkgs/nixos/modules/hardware/keyboard/zsa.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ... }:
+
+let
+  cfg = config.hardware.keyboard.zsa;
+  inherit (lib) mkEnableOption mkIf mdDoc;
+
+in
+{
+  options.hardware.keyboard.zsa = {
+    enable = mkEnableOption (mdDoc ''
+      udev rules for keyboards from ZSA like the ErgoDox EZ, Planck EZ and Moonlander Mark I.
+      You need it when you want to flash a new configuration on the keyboard
+      or use their live training in the browser.
+      You may want to install the wally-cli package.
+    '');
+  };
+
+  config = mkIf cfg.enable {
+    services.udev.packages = [ pkgs.zsa-udev-rules ];
+  };
+}