about summary refs log tree commit diff
path: root/nixos/modules/services/hardware/thermald.nix
blob: 5233794a20cc76915b37f477642c4a2396506bc4 (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
{ 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";
    };
  };
}