summary refs log tree commit diff
path: root/nixos/modules/hardware/acpilight.nix
blob: 2de448a265c79e86ee894f133641ce32150519a1 (plain) (blame)
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
{ config, lib, pkgs, ... }:

with lib;
let
  cfg = config.hardware.acpilight;
in
{
  options = {
    hardware.acpilight = {
      enable = mkOption {
        default = false;
        type = types.bool;
        description = ''
          Enable acpilight.
          This will allow brightness control via xbacklight from users in the video group
        '';
      };
    };
  };

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