summary refs log tree commit diff
path: root/nixos/modules/services/hardware/thinkfan.nix
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2018-07-15 23:28:14 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2018-07-15 23:28:14 +0200
commit92c82e0933a0b3caa73226555c5c8d6d2f516538 (patch)
tree839e2a6206566858e0fd3539b8183b97c22c03a8 /nixos/modules/services/hardware/thinkfan.nix
parentd9f52b3aedda8c28e29ad360d90919bd1e4b71b5 (diff)
downloadnixlib-92c82e0933a0b3caa73226555c5c8d6d2f516538.tar
nixlib-92c82e0933a0b3caa73226555c5c8d6d2f516538.tar.gz
nixlib-92c82e0933a0b3caa73226555c5c8d6d2f516538.tar.bz2
nixlib-92c82e0933a0b3caa73226555c5c8d6d2f516538.tar.lz
nixlib-92c82e0933a0b3caa73226555c5c8d6d2f516538.tar.xz
nixlib-92c82e0933a0b3caa73226555c5c8d6d2f516538.tar.zst
nixlib-92c82e0933a0b3caa73226555c5c8d6d2f516538.zip
nixos/thinkfan: add types & fix formatting
Diffstat (limited to 'nixos/modules/services/hardware/thinkfan.nix')
-rw-r--r--nixos/modules/services/hardware/thinkfan.nix24
1 files changed, 11 insertions, 13 deletions
diff --git a/nixos/modules/services/hardware/thinkfan.nix b/nixos/modules/services/hardware/thinkfan.nix
index ef932440dd9c..d17121ca1c5b 100644
--- a/nixos/modules/services/hardware/thinkfan.nix
+++ b/nixos/modules/services/hardware/thinkfan.nix
@@ -32,7 +32,6 @@ let
     # will add a fixed value of 10 °C the 3rd value read from that file. Check out
     # http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
     # want to add to certain temperatures.
-    
 
     ${cfg.fan}
     ${cfg.sensors}
@@ -55,6 +54,7 @@ in {
     services.thinkfan = {
 
       enable = mkOption {
+        type = types.bool;
         default = false;
         description = ''
           Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads.
@@ -62,6 +62,7 @@ in {
       };
 
       sensors = mkOption {
+        type = types.lines;
         default = ''
           tp_thermal /proc/acpi/ibm/thermal (0,0,10)
         '';
@@ -79,28 +80,26 @@ in {
             S.M.A.R.T. (since 0.9 and requires the USE_ATASMART compilation flag)
               Which reads the temperature directly from the hard
               disk using libatasmart (keyword atasmart)
+
           Multiple sensors may be added, in which case they will be
           numbered in their order of appearance.
         '';
       };
 
       fan = mkOption {
+        type = types.str;
         default = "tp_fan /proc/acpi/ibm/fan";
         description =''
           Specifies the fan we want to use.
           On anything other than a Thinkpad you'll probably
           use some PWM control file in /sys/class/hwmon.
-          Remember that fan levels range from 0 to 255 and that
-          they're just a number, not including the word "level"
-          as seen below.
           A sysfs fan would be specified like this:
             pwm_fan /sys/class/hwmon/hwmon2/device/pwm1
-
-          Remember you can only have one fan.
         '';
       };
 
       levels = mkOption {
+        type = types.lines;
         default = ''
           (0,     0,      55)
           (1,     48,     60)
@@ -110,13 +109,12 @@ in {
           (7,     60,     85)
           (127,   80,     32767)
         '';
-        description =''
-					Syntax:
-					(LEVEL, LOW, HIGH)
-					LEVEL is the fan level to use (0-7 with thinkpad_acpi)
-					LOW is the temperature at which to step down to the previous level
-					HIGH is the temperature at which to step up to the next level
-					All numbers are integers.
+        description = ''
+          (LEVEL, LOW, HIGH)
+          LEVEL is the fan level to use (0-7 with thinkpad_acpi).
+          LOW is the temperature at which to step down to the previous level.
+          HIGH is the temperature at which to step up to the next level.
+          All numbers are integers.
         '';
       };