summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware/acpilight.nix
blob: e0f65bc7aed3204b771c20b6260bf4692ade55db (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
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.hardware.acpilight;
in
{
  options = {
    hardware.acpilight = {
      enable = lib.mkOption {
        default = false;
        type = lib.types.bool;
        description = ''
          Whether to enable acpilight.
          This will allow brightness control via the supplied xbacklight binary from users in the video group. Contrary to what the name suggests, this *will* work without a running X server.
        '';
      };
    };
  };

  config = lib.mkIf cfg.enable {
    environment.systemPackages = with pkgs; [ acpilight ];
    services.udev.packages = with pkgs; [ acpilight ];
  };
}