at 25.11-pre 635 B view raw
1{ 2 config, 3 lib, 4 pkgs, 5 ... 6}: 7let 8 cfg = config.services.illum; 9in 10{ 11 12 options = { 13 14 services.illum = { 15 16 enable = lib.mkOption { 17 default = false; 18 type = lib.types.bool; 19 description = '' 20 Enable illum, a daemon for controlling screen brightness with brightness buttons. 21 ''; 22 }; 23 24 }; 25 26 }; 27 28 config = lib.mkIf cfg.enable { 29 30 systemd.services.illum = { 31 description = "Backlight Adjustment Service"; 32 wantedBy = [ "multi-user.target" ]; 33 serviceConfig.ExecStart = "${pkgs.illum}/bin/illum-d"; 34 serviceConfig.Restart = "on-failure"; 35 }; 36 37 }; 38 39}