summaryrefslogtreecommitdiff
path: root/modules/laptop.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/laptop.nix')
-rw-r--r--modules/laptop.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/laptop.nix b/modules/laptop.nix
new file mode 100644
index 0000000..f619d78
--- /dev/null
+++ b/modules/laptop.nix
@@ -0,0 +1,19 @@
+{ pkgs, ... }:
+
+{
+ services.tlp = {
+ enable = true;
+ settings = {
+ CPU_SCALING_GOVERNOR_ON_AC = "performance";
+ CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
+
+ CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
+ CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
+
+ CPU_MIN_PERF_ON_AC = 0;
+ CPU_MAX_PERF_ON_AC = 100;
+ CPU_MIN_PERF_ON_BAT = 0;
+ CPU_MAX_PERF_ON_BAT = 20;
+ };
+ };
+}