8 cfg = config.services.thermald;
14 enable = lib.mkEnableOption "thermald, the temperature management daemon";
16 debug = lib.mkOption {
17 type = lib.types.bool;
20 Whether to enable debug logging.
24 ignoreCpuidCheck = lib.mkOption {
25 type = lib.types.bool;
27 description = "Whether to ignore the cpuid check to allow running on unsupported platforms";
30 configFile = lib.mkOption {
31 type = lib.types.nullOr lib.types.path;
34 The thermald manual configuration file.
36 Leave unspecified to run with the `--adaptive` flag instead which will have thermald use your computer's DPTF adaptive tables.
38 See `man thermald` for more information.
42 package = lib.mkPackageOption pkgs "thermald" { };
47 config = lib.mkIf cfg.enable {
48 services.dbus.packages = [ cfg.package ];
50 systemd.services.thermald = {
51 description = "Thermal Daemon Service";
52 wantedBy = [ "multi-user.target" ];
54 PrivateNetwork = true;
56 ${cfg.package}/sbin/thermald \
58 ${lib.optionalString cfg.debug "--loglevel=debug"} \
59 ${lib.optionalString cfg.ignoreCpuidCheck "--ignore-cpuid-check"} \
60 ${if cfg.configFile != null then "--config-file ${cfg.configFile}" else "--adaptive"} \