1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-01 17:13:53 +00:00
ultima/modules/nixos/services/autocpu/default.nix
2024-11-21 18:24:15 +09:00

28 lines
603 B
Nix

{ lib, config, True, ... }:
with lib;
let cfg = config.module.services.autocpu;
in {
options = { module.services.autocpu = { enable = mkEnableOption ""; }; };
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;
};
};
};
};
}