mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-01 16:33:55 +00:00
28 lines
596 B
Nix
28 lines
596 B
Nix
{ x, lib, config, ... }:
|
|
|
|
with lib;
|
|
with x;
|
|
let cfg = config.module.services.autocpu;
|
|
in {
|
|
options = { module.services.autocpu = { enable = mkBool; }; };
|
|
|
|
config = mkIf cfg.enable {
|
|
services.auto-cpufreq = True // {
|
|
settings = {
|
|
charger = { # AC MODE
|
|
governor = "performance";
|
|
turbo = "auto";
|
|
};
|
|
battery = { # BAT MODE
|
|
governor = "powersave";
|
|
turbo = "auto";
|
|
energy_perf_bias = "balance_power";
|
|
platform_profile = "low-power";
|
|
enable_thresholds = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|