at 23.05-pre 656 B view raw
1{ config, lib, pkgs, ... }: 2 3let 4 inherit (lib) mkOption mkIf types; 5 cfg = config.hardware.keyboard.zsa; 6in 7{ 8 options.hardware.keyboard.zsa = { 9 enable = mkOption { 10 type = types.bool; 11 default = false; 12 description = lib.mdDoc '' 13 Enables udev rules for keyboards from ZSA like the ErgoDox EZ, Planck EZ and Moonlander Mark I. 14 You need it when you want to flash a new configuration on the keyboard 15 or use their live training in the browser. 16 You may want to install the wally-cli package. 17 ''; 18 }; 19 }; 20 21 config = mkIf cfg.enable { 22 services.udev.packages = [ pkgs.zsa-udev-rules ]; 23 }; 24}