nixpkgs/nixos/modules/services/hardware/illum.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
635 B
Nix
Raw Permalink Normal View History

2017-01-25 18:25:36 +02:00
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.illum;
in
{
options = {
services.illum = {
enable = lib.mkOption {
2017-01-25 18:25:36 +02:00
default = false;
type = lib.types.bool;
2017-01-25 18:25:36 +02:00
description = ''
Enable illum, a daemon for controlling screen brightness with brightness buttons.
'';
};
};
};
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";
serviceConfig.Restart = "on-failure";
2017-01-25 18:25:36 +02:00
};
};
}