vuls: init at 0.27.0
[NixPkgs.git] / nixos / modules / hardware / tuxedo-keyboard.nix
blob01ec486fb88fca94b198af8ac869f047dd5c1ebc
1 { config, lib, pkgs, ... }:
2 let
3   cfg = config.hardware.tuxedo-keyboard;
4   tuxedo-keyboard = config.boot.kernelPackages.tuxedo-keyboard;
5 in
6   {
7     options.hardware.tuxedo-keyboard = {
8       enable = lib.mkEnableOption ''
9           the tuxedo-keyboard driver.
11           To configure the driver, pass the options to the {option}`boot.kernelParams` configuration.
12           There are several parameters you can change. It's best to check at the source code description which options are supported.
13           You can find all the supported parameters at: <https://github.com/tuxedocomputers/tuxedo-keyboard#kernelparam>
15           In order to use the `custom` lighting with the maximumg brightness and a color of `0xff0a0a` one would put pass {option}`boot.kernelParams` like this:
17           ```
18           boot.kernelParams = [
19            "tuxedo_keyboard.mode=0"
20            "tuxedo_keyboard.brightness=255"
21            "tuxedo_keyboard.color_left=0xff0a0a"
22           ];
23           ```
24       '';
25     };
27     config = lib.mkIf cfg.enable
28     {
29       boot.kernelModules = ["tuxedo_keyboard"];
30       boot.extraModulePackages = [ tuxedo-keyboard ];
31     };
32   }