1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6 cfg = config.programs.light;
7
8in
9{
10 options = {
11 programs.light = {
12 enable = mkOption {
13 default = false;
14 type = types.bool;
15 description = lib.mdDoc ''
16 Whether to install Light backlight control command
17 and udev rules granting access to members of the "video" group.
18 '';
19 };
20 };
21 };
22
23 config = mkIf cfg.enable {
24 environment.systemPackages = [ pkgs.light ];
25 services.udev.packages = [ pkgs.light ];
26 };
27}