mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
34 lines
627 B
Nix
34 lines
627 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
cfg = config.services.illum;
|
|
in {
|
|
|
|
options = {
|
|
|
|
services.illum = {
|
|
|
|
enable = lib.mkOption {
|
|
default = false;
|
|
type = lib.types.bool;
|
|
description = ''
|
|
Enable illum, a daemon for controlling screen brightness with brightness buttons.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
systemd.services.illum = {
|
|
description = "Backlight Adjustment Service";
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig.ExecStart = "${pkgs.illum}/bin/illum-d";
|
|
serviceConfig.Restart = "on-failure";
|
|
};
|
|
|
|
};
|
|
|
|
}
|