From 947244095b3efbd282b9dfe9aefcdc9307455459 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 9 Apr 2025 09:13:44 -0700 Subject: [PATCH] Add tools for assessing overheat risk. I'm thinking that I've been overheating my laptop, and that has lead to the occasional restarts. These tools are helping me to assess that. --- nalai/etc/nixos/configuration.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/nalai/etc/nixos/configuration.nix b/nalai/etc/nixos/configuration.nix index bb495bf..c910608 100644 --- a/nalai/etc/nixos/configuration.nix +++ b/nalai/etc/nixos/configuration.nix @@ -60,6 +60,7 @@ kdePackages.plasma-browser-integration keychain libation + lm_sensors lunar-client mosh mercurial @@ -76,6 +77,7 @@ signal-desktop splix spotify-player + s-tui step-ca step-cli thunderbird @@ -224,8 +226,31 @@ # no need to redefine it in your config for now) #media-session.enable = true; }; + services.power-profiles-daemon.enable = false; services.resolved.enable = true; services.tailscale.enable = true; + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 20; + + # Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge + STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging + }; + }; + services.thinkfan = { + enable = true; + }; # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true;