summaryrefslogtreecommitdiffstats
path: root/nixos/modules/programs/rog-control-center.nix
blob: 60d3a84cbc457d0600ae581c5bc7ebcdc81586e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
  config,
  lib,
  pkgs,
  ...
}:

let
  cfg = config.programs.rog-control-center;
in
{
  options = {
    programs.rog-control-center = {
      enable = lib.mkEnableOption "the rog-control-center application";

      autoStart = lib.mkOption {
        default = false;
        type = lib.types.bool;
        description = "Whether rog-control-center should be started automatically.";
      };
    };
  };

  config = lib.mkIf cfg.enable {
    environment.systemPackages = [
      pkgs.asusctl
      (lib.mkIf cfg.autoStart (
        pkgs.makeAutostartItem {
          name = "rog-control-center";
          package = pkgs.asusctl;
        }
      ))
    ];

    services.asusd.enable = true;
  };

  meta.maintainers = pkgs.asusctl.meta.maintainers;
}