about summary refs log tree commit diff
path: root/nixos/modules/services/hardware/thermald.nix
blob: d197c723d55804ad3c6c35ee77567541c862eed7 (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
36
37
38
39
40
{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.services.thermald;

in {

  ###### interface

  options = { 

    services.thermald = { 

      enable = mkOption {
        default = false;
        description = ''
          Whether to enable thermald, the temperature management daemon.
        ''; 
      };  

    };  

  };  


  ###### implementation

  config = mkIf cfg.enable {

    systemd.services.thermald = {
      description = "Thermal Daemon Service";
      wantedBy = [ "multi-user.target" ];
      script = "exec ${pkgs.thermald}/sbin/thermald --no-daemon --dbus-enable";
    };

  };

}