summary refs log tree commit diff stats
path: root/system/settings/machines/t470s.nix
diff options
context:
space:
mode:
authorAlan Pearce2020-03-17 16:22:58 +0100
committerAlan Pearce2020-03-17 16:24:09 +0100
commit324e4b68d5565e7fdcbfa3626eb07d32d15f655a (patch)
treea0ad77aeade0e70cc956725be6fe51c0349e06f0 /system/settings/machines/t470s.nix
parentbbc7e8f724bac6d6303cd73695e4a846609c978d (diff)
downloadnixfiles-324e4b68d5565e7fdcbfa3626eb07d32d15f655a.tar.lz
nixfiles-324e4b68d5565e7fdcbfa3626eb07d32d15f655a.tar.zst
nixfiles-324e4b68d5565e7fdcbfa3626eb07d32d15f655a.zip
thinkpad: enable fan control
Diffstat (limited to 'system/settings/machines/t470s.nix')
-rw-r--r--system/settings/machines/t470s.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/system/settings/machines/t470s.nix b/system/settings/machines/t470s.nix
index 34fdd048..7790ce28 100644
--- a/system/settings/machines/t470s.nix
+++ b/system/settings/machines/t470s.nix
@@ -5,6 +5,25 @@
 
   hardware.enableRedistributableFirmware = true;
 
+  boot.extraModprobeConfig = ''
+    options thinkpad_acpi fan_control=1
+  '';
+
+  services.thinkfan.sensors = ''
+    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_input
+    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input
+    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input
+  '';
+  services.thinkfan.levels = ''
+    (0,     0,      48)
+    (1,     45,     52)
+    (2,     50,     57)
+    (3,     55,     63)
+    (6,     60,     65)
+    (7,     60,     85)
+    (127,   80,     32767)
+  '';
+
   boot.postBootCommands = ''
     echo bfq > /sys/block/nvme0n1/queue/scheduler
   '';