···2828 # temperatures are read from the file.
2929 #
3030 # For example:
3131- # sensor /proc/acpi/ibm/thermal (0, 0, 10)
3131+ # tp_thermal /proc/acpi/ibm/thermal (0, 0, 10)
3232 # will add a fixed value of 10 °C the 3rd value read from that file. Check out
3333 # http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
3434 # want to add to certain temperatures.
3535-3535+3636+ ${cfg.fan}
3737+ ${cfg.sensors}
3838+3639 # Syntax:
3740 # (LEVEL, LOW, HIGH)
3841 # LEVEL is the fan level to use (0-7 with thinkpad_acpi)
···4144 # All numbers are integers.
4245 #
43464444- sensor ${cfg.sensor} (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)
4545-4647 ${cfg.levels}
4748 '';
4849···5354 services.thinkfan = {
54555556 enable = mkOption {
5757+ type = types.bool;
5658 default = false;
5759 description = ''
5860 Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads.
5961 '';
6062 };
61636262- sensor = mkOption {
6363- default = "/proc/acpi/ibm/thermal";
6464+ sensors = mkOption {
6565+ type = types.lines;
6666+ default = ''
6767+ tp_thermal /proc/acpi/ibm/thermal (0,0,10)
6868+ '';
6969+ description =''
7070+ thinkfan can read temperatures from three possible sources:
7171+7272+ /proc/acpi/ibm/thermal
7373+ Which is provided by the thinkpad_acpi kernel
7474+ module (keyword tp_thermal)
7575+7676+ /sys/class/hwmon/*/temp*_input
7777+ Which may be provided by any hwmon drivers (keyword
7878+ hwmon)
7979+8080+ S.M.A.R.T. (since 0.9 and requires the USE_ATASMART compilation flag)
8181+ Which reads the temperature directly from the hard
8282+ disk using libatasmart (keyword atasmart)
8383+8484+ Multiple sensors may be added, in which case they will be
8585+ numbered in their order of appearance.
8686+ '';
8787+ };
8888+8989+ fan = mkOption {
9090+ type = types.str;
9191+ default = "tp_fan /proc/acpi/ibm/fan";
6492 description =''
6565- Sensor used by thinkfan
9393+ Specifies the fan we want to use.
9494+ On anything other than a Thinkpad you'll probably
9595+ use some PWM control file in /sys/class/hwmon.
9696+ A sysfs fan would be specified like this:
9797+ pwm_fan /sys/class/hwmon/hwmon2/device/pwm1
6698 '';
6799 };
6810069101 levels = mkOption {
102102+ type = types.lines;
70103 default = ''
71104 (0, 0, 55)
72105 (1, 48, 60)
···76109 (7, 60, 85)
77110 (127, 80, 32767)
78111 '';
7979- description =''
8080- Sensor used by thinkfan
112112+ description = ''
113113+ (LEVEL, LOW, HIGH)
114114+ LEVEL is the fan level to use (0-7 with thinkpad_acpi).
115115+ LOW is the temperature at which to step down to the previous level.
116116+ HIGH is the temperature at which to step up to the next level.
117117+ All numbers are integers.
81118 '';
82119 };
83120