about summary refs log tree commit diff stats
path: root/sys/power
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-26 23:42:21 +0200
committerSoispha <soispha@vhack.eu>2023-08-26 23:42:21 +0200
commit3f600ab07dbad3b6dd7655587ddea158b19aea71 (patch)
tree7164ccd965e1d14ade970aeb8eb188b1442a6c91 /sys/power
parentStyle(treewide): Format all lua-files makes lua ➛ nix easier (diff)
downloadnixos-config-3f600ab07dbad3b6dd7655587ddea158b19aea71.tar.gz
nixos-config-3f600ab07dbad3b6dd7655587ddea158b19aea71.zip
Refactor(treewide): Abbreviate path names
Diffstat (limited to 'sys/power')
-rw-r--r--sys/power/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/power/default.nix b/sys/power/default.nix
new file mode 100644
index 00000000..d20a97f2
--- /dev/null
+++ b/sys/power/default.nix
@@ -0,0 +1,19 @@
+{...}: {
+  # see this for reference: https://github.com/NixOS/nixpkgs/issues/211345
+  services = {
+    # conflicts with tlp
+    power-profiles-daemon.enable = false;
+    thermald.enable = true;
+    tlp = {
+      enable = true;
+      settings = {
+        CPU_BOOST_ON_AC = 1;
+        CPU_BOOST_ON_BAT = 0;
+        CPU_SCALING_GOVERNOR_ON_AC = "performance";
+        CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
+        SATA_LINKPWR_ON_AC = "max_performance";
+        SATA_LINKPWR_ON_BAT = "min_power";
+      };
+    };
+  };
+}