···28 # temperatures are read from the file.
29 #
30 # For example:
31- # sensor /proc/acpi/ibm/thermal (0, 0, 10)
32 # will add a fixed value of 10 °C the 3rd value read from that file. Check out
33 # http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
34 # want to add to certain temperatures.
35-00036 # Syntax:
37 # (LEVEL, LOW, HIGH)
38 # LEVEL is the fan level to use (0-7 with thinkpad_acpi)
···41 # All numbers are integers.
42 #
4344- sensor ${cfg.sensor} (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)
45-46 ${cfg.levels}
47 '';
48···53 services.thinkfan = {
5455 enable = mkOption {
056 default = false;
57 description = ''
58 Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads.
59 '';
60 };
6162- sensor = mkOption {
63- default = "/proc/acpi/ibm/thermal";
0000000000000000000000000064 description =''
65- Sensor used by thinkfan
000066 '';
67 };
6869 levels = mkOption {
070 default = ''
71 (0, 0, 55)
72 (1, 48, 60)
···76 (7, 60, 85)
77 (127, 80, 32767)
78 '';
79- description =''
80- Sensor used by thinkfan
000081 '';
82 };
83
···28 # temperatures are read from the file.
29 #
30 # For example:
31+ # tp_thermal /proc/acpi/ibm/thermal (0, 0, 10)
32 # will add a fixed value of 10 °C the 3rd value read from that file. Check out
33 # http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
34 # want to add to certain temperatures.
35+36+ ${cfg.fan}
37+ ${cfg.sensors}
38+39 # Syntax:
40 # (LEVEL, LOW, HIGH)
41 # LEVEL is the fan level to use (0-7 with thinkpad_acpi)
···44 # All numbers are integers.
45 #
460047 ${cfg.levels}
48 '';
49···54 services.thinkfan = {
5556 enable = mkOption {
57+ type = types.bool;
58 default = false;
59 description = ''
60 Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads.
61 '';
62 };
6364+ sensors = mkOption {
65+ type = types.lines;
66+ default = ''
67+ tp_thermal /proc/acpi/ibm/thermal (0,0,10)
68+ '';
69+ description =''
70+ thinkfan can read temperatures from three possible sources:
71+72+ /proc/acpi/ibm/thermal
73+ Which is provided by the thinkpad_acpi kernel
74+ module (keyword tp_thermal)
75+76+ /sys/class/hwmon/*/temp*_input
77+ Which may be provided by any hwmon drivers (keyword
78+ hwmon)
79+80+ S.M.A.R.T. (since 0.9 and requires the USE_ATASMART compilation flag)
81+ Which reads the temperature directly from the hard
82+ disk using libatasmart (keyword atasmart)
83+84+ Multiple sensors may be added, in which case they will be
85+ numbered in their order of appearance.
86+ '';
87+ };
88+89+ fan = mkOption {
90+ type = types.str;
91+ default = "tp_fan /proc/acpi/ibm/fan";
92 description =''
93+ Specifies the fan we want to use.
94+ On anything other than a Thinkpad you'll probably
95+ use some PWM control file in /sys/class/hwmon.
96+ A sysfs fan would be specified like this:
97+ pwm_fan /sys/class/hwmon/hwmon2/device/pwm1
98 '';
99 };
100101 levels = mkOption {
102+ type = types.lines;
103 default = ''
104 (0, 0, 55)
105 (1, 48, 60)
···109 (7, 60, 85)
110 (127, 80, 32767)
111 '';
112+ description = ''
113+ (LEVEL, LOW, HIGH)
114+ LEVEL is the fan level to use (0-7 with thinkpad_acpi).
115+ LOW is the temperature at which to step down to the previous level.
116+ HIGH is the temperature at which to step up to the next level.
117+ All numbers are integers.
118 '';
119 };
120