dotfiles/nixos/boxes/foureighty/thermal.nix

36 lines
769 B
Nix
Raw Normal View History

2022-04-02 08:14:30 +01:00
{ config, pkgs, lib, ... }: {
boot.extraModprobeConfig = "options thinkpad_acpi fan_control=1";
services.thinkfan = {
enable = true;
levels = [
[ 0 0 55 ]
[ 1 48 60 ]
[ 2 50 61 ]
[ 3 52 63 ]
[ 6 56 65 ]
[ 7 60 85 ]
[ "level full-speed" 80 32767 ]
];
sensors = [
{
type = "hwmon";
query = "/sys/class/hwmon";
name = "coretemp";
indices = [ 1 2 3 ];
}
{
type = "hwmon";
query = "/sys/devices/platform/thinkpad_hwmon/hwmon";
indices = [ 1 ];
}
{
type = "tpacpi";
query = "/proc/acpi/ibm/thermal";
indices = [ 0 ];
}
];
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}