hosts | add auto-cpufreq, switch loki & smaug to use, formating

This commit is contained in:
Don Harper 2025-08-21 13:39:59 -05:00
parent b7ca0e0020
commit 43fe882270
5 changed files with 54 additions and 7 deletions

View file

@ -0,0 +1,30 @@
{
pkgs,
inputs,
config,
lib,
...
}:
with lib; let
cfg = config.roles.auto-cpufreq;
in {
options.roles.auto-cpufreq = {enable = mkEnableOption "roles auto-cpufreq";};
config = mkIf cfg.enable {
services.auto-cpufreq = {
enable = true;
settings = {
battery = {
governor = "powersave";
turbo = "never";
enable_thresholds = true;
start_threshold = 50;
stop_threshold = 80;
};
charger = {
governor = "performance";
turbo = "auto";
};
};
};
};
}