diff options
author | Alan Pearce | 2020-03-17 16:22:58 +0100 |
---|---|---|
committer | Alan Pearce | 2020-03-17 16:24:09 +0100 |
commit | 324e4b68d5565e7fdcbfa3626eb07d32d15f655a (patch) | |
tree | a0ad77aeade0e70cc956725be6fe51c0349e06f0 | |
parent | bbc7e8f724bac6d6303cd73695e4a846609c978d (diff) | |
download | nixfiles-324e4b68d5565e7fdcbfa3626eb07d32d15f655a.tar.xz nixfiles-324e4b68d5565e7fdcbfa3626eb07d32d15f655a.zip |
thinkpad: enable fan control
-rw-r--r-- | system/settings/hardware/thinkpad.nix | 7 | ||||
-rw-r--r-- | system/settings/machines/t470s.nix | 19 |
2 files changed, 26 insertions, 0 deletions
diff --git a/system/settings/hardware/thinkpad.nix b/system/settings/hardware/thinkpad.nix index e4ddb829..4f4e6b8c 100644 --- a/system/settings/hardware/thinkpad.nix +++ b/system/settings/hardware/thinkpad.nix | |||
@@ -2,11 +2,18 @@ | |||
2 | 2 | ||
3 | { boot.kernelModules = [ ]; | 3 | { boot.kernelModules = [ ]; |
4 | boot.blacklistedKernelModules = [ "thinkpad_ec" ]; | 4 | boot.blacklistedKernelModules = [ "thinkpad_ec" ]; |
5 | boot.extraModulePackages = with config.boot.kernelPackages; [ | ||
6 | acpi_call | ||
7 | ]; | ||
5 | 8 | ||
6 | services.fwupd = { | 9 | services.fwupd = { |
7 | enable = true; | 10 | enable = true; |
8 | }; | 11 | }; |
9 | 12 | ||
13 | services.thinkfan = { | ||
14 | enable = true; | ||
15 | }; | ||
16 | |||
10 | imports = [ | 17 | imports = [ |
11 | ./bare-metal.nix | 18 | ./bare-metal.nix |
12 | ./laptop.nix | 19 | ./laptop.nix |
diff --git a/system/settings/machines/t470s.nix b/system/settings/machines/t470s.nix index 34fdd048..7790ce28 100644 --- a/system/settings/machines/t470s.nix +++ b/system/settings/machines/t470s.nix | |||
@@ -5,6 +5,25 @@ | |||
5 | 5 | ||
6 | hardware.enableRedistributableFirmware = true; | 6 | hardware.enableRedistributableFirmware = true; |
7 | 7 | ||
8 | boot.extraModprobeConfig = '' | ||
9 | options thinkpad_acpi fan_control=1 | ||
10 | ''; | ||
11 | |||
12 | services.thinkfan.sensors = '' | ||
13 | hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_input | ||
14 | hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input | ||
15 | hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input | ||
16 | ''; | ||
17 | services.thinkfan.levels = '' | ||
18 | (0, 0, 48) | ||
19 | (1, 45, 52) | ||
20 | (2, 50, 57) | ||
21 | (3, 55, 63) | ||
22 | (6, 60, 65) | ||
23 | (7, 60, 85) | ||
24 | (127, 80, 32767) | ||
25 | ''; | ||
26 | |||
8 | boot.postBootCommands = '' | 27 | boot.postBootCommands = '' |
9 | echo bfq > /sys/block/nvme0n1/queue/scheduler | 28 | echo bfq > /sys/block/nvme0n1/queue/scheduler |
10 | ''; | 29 | ''; |