From a45c4551712c1ba5cb82eaf290f311ab0e8690e4 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Mon, 9 Jun 2025 17:40:46 +0000 Subject: big changes --- hosts/mercury/battery.nix | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 hosts/mercury/battery.nix (limited to 'hosts/mercury/battery.nix') 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 + # ]; +} -- cgit v1.3.1