all repos — nixfiles @ 324e4b68d5565e7fdcbfa3626eb07d32d15f655a

System and user configuration, managed by nix and home-manager

thinkpad: enable fan control

Alan Pearce
commit

324e4b68d5565e7fdcbfa3626eb07d32d15f655a

parent

bbc7e8f724bac6d6303cd73695e4a846609c978d

2 files changed, 26 insertions(+), 0 deletions(-)

jump to
M system/settings/hardware/thinkpad.nixsystem/settings/hardware/thinkpad.nix
@@ -2,8 +2,15 @@ { config, pkgs, ... }:
{ boot.kernelModules = [ ]; boot.blacklistedKernelModules = [ "thinkpad_ec" ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ + acpi_call + ]; services.fwupd = { + enable = true; + }; + + services.thinkfan = { enable = true; };
M system/settings/machines/t470s.nixsystem/settings/machines/t470s.nix
@@ -5,6 +5,25 @@ systemd.services.ModemManager.enable = false;
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 '';