You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1.2 KiB

  1. { config, lib, pkgs, ... }:
  2. with lib;
  3. let
  4. cfg = config.hardware.tuxedo-keyboard;
  5. tuxedo-keyboard = config.boot.kernelPackages.tuxedo-keyboard;
  6. in
  7. {
  8. options.hardware.tuxedo-keyboard = {
  9. enable = mkEnableOption ''
  10. Enables the tuxedo-keyboard driver.
  11. To configure the driver, pass the options to the <option>boot.kernelParams</option> 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: <link xlink:href="https://github.com/tuxedocomputers/tuxedo-keyboard#kernelparam" />
  14. In order to use the <literal>custom</literal> lighting with the maximumg brightness and a color of <literal>0xff0a0a</literal> one would put pass <option>boot.kernelParams</option> like this:
  15. <programlisting>
  16. boot.kernelParams = [
  17. "tuxedo_keyboard.mode=0"
  18. "tuxedo_keyboard.brightness=255"
  19. "tuxedo_keyboard.color_left=0xff0a0a"
  20. ];
  21. </programlisting>
  22. '';
  23. };
  24. config = mkIf cfg.enable
  25. {
  26. boot.kernelModules = ["tuxedo_keyboard"];
  27. boot.extraModulePackages = [ tuxedo-keyboard ];
  28. };
  29. }