about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLin Jian <me@linj.tech>2024-05-17 21:15:43 +0800
committerGitHub <noreply@github.com>2024-05-17 21:15:43 +0800
commit805191d9fbdc76cedb8cc7712415f766c6220d6b (patch)
tree9f82a5177f4de87cbe7332ec5fc392cc97dce4a6 /nixos
parentb0ac16cd2eb96cacaa554594675f0af23515a06a (diff)
parent12e2e82939dc3fbece87cf79ba4a2548a4cef98d (diff)
Merge pull request #309455 from c-leri/nixos/fix/thermald-adaptative
nixos/thermald: improve doc and code about configFile and adaptive
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/hardware/thermald.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/nixos/modules/services/hardware/thermald.nix b/nixos/modules/services/hardware/thermald.nix
index 25cfd97016288..fb7cf3735a7ea 100644
--- a/nixos/modules/services/hardware/thermald.nix
+++ b/nixos/modules/services/hardware/thermald.nix
@@ -28,7 +28,13 @@ in
       configFile = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = "the thermald manual configuration file.";
+        description = ''
+          The thermald manual configuration file.
+
+          Leave unspecified to run with the `--adaptive` flag instead which will have thermald use your computer's DPTF adaptive tables.
+
+          See `man thermald` for more information.
+        '';
       };
 
       package = mkPackageOption pkgs "thermald" { };
@@ -49,8 +55,7 @@ in
             --no-daemon \
             ${optionalString cfg.debug "--loglevel=debug"} \
             ${optionalString cfg.ignoreCpuidCheck "--ignore-cpuid-check"} \
-            ${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \
-            ${optionalString (cfg.configFile == null) "--adaptive"} \
+            ${if cfg.configFile != null then "--config-file ${cfg.configFile}" else "--adaptive"} \
             --dbus-enable
         '';
       };