about summary refs log tree commit diff
path: root/machines/profpatsch
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-03-16 17:21:22 +0100
committerProfpatsch <mail@profpatsch.de>2022-03-16 17:22:17 +0100
commit652ac49da16123016c36537dc28331649a63bf7b (patch)
treea69f2488877c416a7b1c0a9b51e691830e549d12 /machines/profpatsch
parent57c8f476c83847f90dda16327aa76bb11f912e88 (diff)
machines/profpatsch/base-workstation: add upower with suspend
Upstream is dumb, but the tool is certainly useful, so let’s patch it
to make it workable and then also patch the nixos module …
Diffstat (limited to 'machines/profpatsch')
-rw-r--r--machines/profpatsch/base-workstation.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/machines/profpatsch/base-workstation.nix b/machines/profpatsch/base-workstation.nix
index b9e07ee0..a48c18b4 100644
--- a/machines/profpatsch/base-workstation.nix
+++ b/machines/profpatsch/base-workstation.nix
@@ -47,6 +47,20 @@ in {
       freeMemThreshold = 5; # <5% free
     };
 
+    vuizvui.services.upower = {
+      enable = true;
+      settings = {
+        UPower = {
+          UsePercentageForPolicy = true;
+          CriticalPowerAction = "Suspend";
+
+          PercentageLow = 15;
+          PercentageCritical = 8;
+          PercentageAction = 5;
+        };
+      };
+    };
+
     ###################
     # Graphical System