1{ config, lib, pkgs, ... }:
2
3with lib;
4let
5 cfg = config.hardware.acpilight;
6in
7{
8 options = {
9 hardware.acpilight = {
10 enable = mkOption {
11 default = false;
12 type = types.bool;
13 description = lib.mdDoc ''
14 Enable acpilight.
15 This will allow brightness control via xbacklight from users in the video group
16 '';
17 };
18 };
19 };
20
21 config = mkIf cfg.enable {
22 environment.systemPackages = with pkgs; [ acpilight ];
23 services.udev.packages = with pkgs; [ acpilight ];
24 };
25}