8 cfg = config.services.g810-led;
13 enable = lib.mkEnableOption "g810-led, a Linux LED controller for some Logitech G Keyboards";
15 package = lib.mkPackageOption pkgs "g810-led" { };
17 profile = lib.mkOption {
18 type = lib.types.nullOr lib.types.lines;
21 # G810-LED Profile (turn all keys on)
30 Keyboard profile to apply at boot time.
32 The upstream repository provides [example configurations](https://github.com/MatMoul/g810-led/tree/master/sample_profiles).
38 config = lib.mkIf cfg.enable {
39 environment.etc."g810-led/profile".text = lib.mkIf (cfg.profile != null) cfg.profile;
41 services.udev.packages = [ cfg.package ];
44 meta.maintainers = with lib.maintainers; [ GaetanLepage ];