diff options
author | Peter Hoeg <peter@hoeg.com> | 2023-02-15 11:34:22 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2023-02-15 11:34:22 +0800 |
commit | 7dc0f77ecf41ae952d7e8ed4830048125721c414 (patch) | |
tree | 9271d83b4da645886c78297f14257592908471c3 | |
parent | 2a97c0d985791d4d3edce9d8432db983a6905203 (diff) | |
download | nixpkgs-7dc0f77ecf41ae952d7e8ed4830048125721c414.tar nixpkgs-7dc0f77ecf41ae952d7e8ed4830048125721c414.tar.gz nixpkgs-7dc0f77ecf41ae952d7e8ed4830048125721c414.tar.bz2 nixpkgs-7dc0f77ecf41ae952d7e8ed4830048125721c414.tar.lz nixpkgs-7dc0f77ecf41ae952d7e8ed4830048125721c414.tar.xz nixpkgs-7dc0f77ecf41ae952d7e8ed4830048125721c414.tar.zst nixpkgs-7dc0f77ecf41ae952d7e8ed4830048125721c414.zip |
nixos/hardware: clean up "with lib;" for keyboards
-rw-r--r-- | nixos/modules/hardware/keyboard/teck.nix | 6 | ||||
-rw-r--r-- | nixos/modules/hardware/keyboard/uhk.nix | 7 | ||||
-rw-r--r-- | nixos/modules/hardware/keyboard/zsa.nix | 19 |
3 files changed, 15 insertions, 17 deletions
diff --git a/nixos/modules/hardware/keyboard/teck.nix b/nixos/modules/hardware/keyboard/teck.nix index 2705668d9a7..8376c6b9c50 100644 --- a/nixos/modules/hardware/keyboard/teck.nix +++ b/nixos/modules/hardware/keyboard/teck.nix @@ -1,16 +1,16 @@ { config, lib, pkgs, ... }: -with lib; let cfg = config.hardware.keyboard.teck; + inherit (lib) mdDoc mkEnableOption mkIf; + in { options.hardware.keyboard.teck = { - enable = mkEnableOption (lib.mdDoc "non-root access to the firmware of TECK keyboards"); + enable = mkEnableOption (mdDoc "non-root access to the firmware of TECK keyboards"); }; config = mkIf cfg.enable { services.udev.packages = [ pkgs.teck-udev-rules ]; }; } - diff --git a/nixos/modules/hardware/keyboard/uhk.nix b/nixos/modules/hardware/keyboard/uhk.nix index c1805143993..17baff83d88 100644 --- a/nixos/modules/hardware/keyboard/uhk.nix +++ b/nixos/modules/hardware/keyboard/uhk.nix @@ -1,13 +1,14 @@ { config, lib, pkgs, ... }: -with lib; let cfg = config.hardware.keyboard.uhk; + inherit (lib) mdDoc mkEnableOption mkIf; + in { options.hardware.keyboard.uhk = { - enable = mkEnableOption (lib.mdDoc '' - non-root access to the firmware of UHK keyboards. + enable = mkEnableOption (mdDoc '' + non-root access to the firmware of UHK keyboards. You need it when you want to flash a new firmware on the keyboard. Access to the keyboard is granted to users in the "input" group. You may want to install the uhk-agent package. diff --git a/nixos/modules/hardware/keyboard/zsa.nix b/nixos/modules/hardware/keyboard/zsa.nix index 5bf4022cdc4..a04b67b5c8d 100644 --- a/nixos/modules/hardware/keyboard/zsa.nix +++ b/nixos/modules/hardware/keyboard/zsa.nix @@ -1,21 +1,18 @@ { config, lib, pkgs, ... }: let - inherit (lib) mkOption mkIf types; cfg = config.hardware.keyboard.zsa; + inherit (lib) mkEnableOption mkIf mdDoc; + in { options.hardware.keyboard.zsa = { - enable = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Enables 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. - ''; - }; + 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 { |