summary refs log tree commit diff
path: root/nixos/modules/services/hardware/illum.nix
blob: ff73c99a653760acdd68ec49415b60b39b7e7ad4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ 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";
    };

  };

}