2014-11-10 03:32:11 +01: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 23:19:15 +02:00
|
|
|
description = lib.mdDoc ''
|
2018-10-01 04:16:56 +02:00
|
|
|
Whether to install Light backlight control command
|
|
|
|
and udev rules granting access to members of the "video" group.
|
2014-11-10 03:32:11 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.light ];
|
2018-09-30 13:11:56 +02:00
|
|
|
services.udev.packages = [ pkgs.light ];
|
2014-11-10 03:32:11 +01:00
|
|
|
};
|
|
|
|
}
|