From 652ac49da16123016c36537dc28331649a63bf7b Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 16 Mar 2022 17:21:22 +0100 Subject: machines/profpatsch/base-workstation: add upower with suspend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 … --- machines/profpatsch/base-workstation.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'machines/profpatsch') 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 -- cgit 1.4.1