summary refs log tree commit diff stats
path: root/sys
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-10-06 18:04:29 +0200
committersils <sils@sils.li>2023-10-06 18:04:29 +0200
commit84fec74020b178a78491ed1137acf816b330b9bf (patch)
treee8e36fc859ecb33138e037c1a8bdb15b5a4f88ff /sys
parentbuild(flake): update (diff)
downloadnix-config-84fec74020b178a78491ed1137acf816b330b9bf.tar.gz
nix-config-84fec74020b178a78491ed1137acf816b330b9bf.zip
feat(sys/services/upower): add
Diffstat (limited to 'sys')
-rw-r--r--sys/services/default.nix1
-rw-r--r--sys/services/upower/default.nix10
2 files changed, 11 insertions, 0 deletions
diff --git a/sys/services/default.nix b/sys/services/default.nix
index 8c396b6..a5a459e 100644
--- a/sys/services/default.nix
+++ b/sys/services/default.nix
@@ -5,5 +5,6 @@
     ./logind
     ./printing
     ./tlp
+    ./upower
   ];
 }
diff --git a/sys/services/upower/default.nix b/sys/services/upower/default.nix
new file mode 100644
index 0000000..bd9d0be
--- /dev/null
+++ b/sys/services/upower/default.nix
@@ -0,0 +1,10 @@
+{...}: {
+  services.upower = {
+    enable = true;
+    usePercentageForPolicy = true;
+    percentageLow = 10;
+    percentageCritical = 5;
+    percentageAction = 1;
+    criticalPowerAction = "Hibernate";
+  };
+}