2014-11-10 02:32:11 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.light;
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.light = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
2022-07-28 21:19:15 +00:00
|
|
|
description = lib.mdDoc ''
|
2018-10-01 02:16:56 +00:00
|
|
|
Whether to install Light backlight control command
|
|
|
|
and udev rules granting access to members of the "video" group.
|
2014-11-10 02:32:11 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.light ];
|
2018-09-30 11:11:56 +00:00
|
|
|
services.udev.packages = [ pkgs.light ];
|
2014-11-10 02:32:11 +00:00
|
|
|
};
|
|
|
|
}
|