From d732a7f5c50f33443f63a03a6833ee2b31417a55 Mon Sep 17 00:00:00 2001
From: Barton Yadlowski <b@bmorphism.us>
Date: Sat, 2 Jan 2016 04:49:58 -0500
Subject: [PATCH] thinkfan levels option to control actuation points

---
 nixos/modules/services/hardware/thinkfan.nix | 24 ++++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/nixos/modules/services/hardware/thinkfan.nix b/nixos/modules/services/hardware/thinkfan.nix
index 16c31aab2d5..018e82e58a3 100644
--- a/nixos/modules/services/hardware/thinkfan.nix
+++ b/nixos/modules/services/hardware/thinkfan.nix
@@ -43,13 +43,7 @@ let
 
     sensor ${cfg.sensor} (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)
     
-    (0,     0,      55)
-    (1,     48,     60)
-    (2,     50,     61)
-    (3,     52,     63)
-    (6,     56,     65)
-    (7,     60,     85)
-    (127,   80,     32767)
+    ${cfg.levels}
   '';
 
 in {
@@ -72,6 +66,22 @@ in {
         '';
       };
 
+      levels = mkOption {
+        default = ''
+          (0,     0,      55)
+          (1,     48,     60)
+          (2,     50,     61)
+          (3,     52,     63)
+          (6,     56,     65)
+          (7,     60,     85)
+          (127,   80,     32767)
+        '';
+        description =''
+          Sensor used by thinkfan
+        '';
+      };
+
+
     };
 
   };