mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
fd3d1a834b
If there is a fatal error and illum exits, it should be safe to restart it.
37 lines
627 B
Nix
37 lines
627 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.illum;
|
|
in {
|
|
|
|
options = {
|
|
|
|
services.illum = {
|
|
|
|
enable = mkOption {
|
|
default = false;
|
|
type = types.bool;
|
|
description = ''
|
|
Enable illum, a daemon for controlling screen brightness with brightness buttons.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = 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";
|
|
};
|
|
|
|
};
|
|
|
|
}
|