2017-01-25 18:25:36 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.services.illum;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.illum = {
|
|
|
|
|
2024-08-27 20:43:17 +02:00
|
|
|
enable = lib.mkOption {
|
2017-01-25 18:25:36 +02:00
|
|
|
default = false;
|
2024-08-27 20:43:17 +02:00
|
|
|
type = lib.types.bool;
|
2017-01-25 18:25:36 +02:00
|
|
|
description = ''
|
|
|
|
Enable illum, a daemon for controlling screen brightness with brightness buttons.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-08-27 20:43:17 +02:00
|
|
|
config = lib.mkIf cfg.enable {
|
2017-01-25 18:25:36 +02:00
|
|
|
|
|
|
|
systemd.services.illum = {
|
|
|
|
description = "Backlight Adjustment Service";
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
serviceConfig.ExecStart = "${pkgs.illum}/bin/illum-d";
|
2022-05-05 22:31:56 +02:00
|
|
|
serviceConfig.Restart = "on-failure";
|
2017-01-25 18:25:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|