1 { config, lib, pkgs, ... }:
6 cfg = config.services.thermald;
12 enable = mkEnableOption (lib.mdDoc "thermald, the temperature management daemon");
17 description = lib.mdDoc ''
18 Whether to enable debug logging.
22 configFile = mkOption {
23 type = types.nullOr types.path;
25 description = lib.mdDoc "the thermald manual configuration file.";
30 default = pkgs.thermald;
31 defaultText = literalExpression "pkgs.thermald";
32 description = lib.mdDoc "Which thermald package to use.";
38 config = mkIf cfg.enable {
39 services.dbus.packages = [ cfg.package ];
41 systemd.services.thermald = {
42 description = "Thermal Daemon Service";
43 wantedBy = [ "multi-user.target" ];
45 PrivateNetwork = true;
47 ${cfg.package}/sbin/thermald \
49 ${optionalString cfg.debug "--loglevel=debug"} \
50 ${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \