diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2025-06-09 17:40:46 +0000 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2025-06-09 17:40:46 +0000 |
| commit | a45c4551712c1ba5cb82eaf290f311ab0e8690e4 (patch) | |
| tree | f62b23489fb31f8ea58fef77f99619efd784eb36 /hosts/mercury/battery.nix | |
big changes
Diffstat (limited to 'hosts/mercury/battery.nix')
| -rw-r--r-- | hosts/mercury/battery.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/hosts/mercury/battery.nix b/hosts/mercury/battery.nix new file mode 100644 index 0000000..ff7e59e --- /dev/null +++ b/hosts/mercury/battery.nix @@ -0,0 +1,47 @@ +{pkgs, ...}: { + # auto-cpufreq + services.power-profiles-daemon.enable = false; # conflicts with auto-cpufreq + services.tlp.enable = false; # conflicts with auto-cpufreq + services.thermald.enable = true; # does not conflict, recomended to run with auto-cpufreq + services.auto-cpufreq = { + enable = true; + settings = { + charger = { + governor = "performance"; + energy_performance_preference = "performance"; + turbo = "auto"; + }; + battery = { + governor = "powersave"; + energy_performance_preference = "power"; + turbo = "never"; + }; + }; + }; + + # Undervolt + services.undervolt = { + enable = true; + useTimer = false; + # power-limit-long + p1 = { + window = 1; # no clue what this means + limit = 40; + }; + + # power-limit-short + p2 = { + window = 1; + limit = 50; + }; + + coreOffset = -50; # also applied to cache + gpuOffset = -10; + }; + + # environment.systemPackages = with pkgs; [ + # undervolt + # s-tui + # stress + # ]; +} |
