laptop: init (w/ logind lid switch events and auto-cpufreq)

This commit is contained in:
wo2wz 2025-10-22 18:42:08 -04:00
parent 5bca120e01
commit e70698c848

View file

@ -0,0 +1,36 @@
{ config, ... }:
{
services.logind = {
lidSwitch = "suspend";
lidSwitchExternalPower = "lock";
lidSwitchDocked = "ignore";
};
services = {
tlp.enable = false;
power-profiles-daemon.enable = false;
};
services.auto-cpufreq = {
enable = true;
settings = {
battery = {
governor = "powersave";
energy_performance_preference = "power";
platform_profile = "cool";
turbo = "never";
enable_thresholds = true;
start_threshold = 50;
stop_threshold = 80;
};
charger = {
governor = "performance";
energy_performance_preference = "performance";
platform_profile = "performance";
turbo = "auto";
};
};
};
}