Skip to content

Instantly share code, notes, and snippets.

@dmvianna
Forked from truthadjustr/thinkfan.nix
Created October 26, 2019 10:36
Show Gist options
  • Save dmvianna/6908f1e347abf3c6fcd94338bec2939f to your computer and use it in GitHub Desktop.
Save dmvianna/6908f1e347abf3c6fcd94338bec2939f to your computer and use it in GitHub Desktop.
nixos: thinkfan configuration in /etc/nixos/configuration.nix
# Thinkpad T440
# postconditions:
# 1) status should be enabled:
# cat /proc/acpi/ibm/fan
# 2) No errors in systemd logs:
# journalctl -u thinkfan.service -f
services = {
thinkfan = {
enable = true;
sensors = ''
# Entries here discovered by:
# find /sys/devices -type f -name "temp*_input"
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
hwmon /sys/devices/virtual/hwmon/hwmon1/temp1_input
'';
levels = ''
(0, 0, 42)
(1, 40, 47)
(2, 45, 52)
(3, 50, 57)
(4, 55, 62)
(5, 60, 77)
(7, 73, 93)
(127, 85, 32767)
'';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment