From 3065deb6e1872039b3a667c10bb426f66b29c5c3 Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 23 Jun 2022 23:31:16 +0200 Subject: [PATCH] Enable thinkfan --- modules/power.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/power.nix b/modules/power.nix index c057a8f..d84b341 100644 --- a/modules/power.nix +++ b/modules/power.nix @@ -11,4 +11,10 @@ services.udev.extraRules = '' SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{model_name}=="01AV405", ATTR{capacity}=="[0-5]", RUN+="${config.systemd.package}/bin/systemctl suspend -i" ''; + + # Enable thinkfan + services.thinkfan.enable = true; + systemd.services.thinkfan.preStart = '' + /run/current-system/sw/bin/modprobe -r thinkpad_acpi && /run/current-system/sw/bin/modprobe thinkpad_acpi + ''; }