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 = ''
16 Whether to install Light backlight control with setuid wrapper.
17 '';
18 };
19 };
20 };
21
22 config = mkIf cfg.enable {
23 environment.systemPackages = [ pkgs.light ];
24 security.setuidPrograms = [ "light" ];
25 };
26}