From 8ed4a576e203ee707b8822b7786d413d3180961a Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Fri, 31 Mar 2023 21:16:57 +0200 Subject: [PATCH] [Laptop] Don't start automatic system upgrade if on battery --- laptop.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/laptop.nix b/laptop.nix index 1131773..5e3de52 100644 --- a/laptop.nix +++ b/laptop.nix @@ -35,6 +35,11 @@ in { pcie_aspm = mkIf cfg.tweaks.pcieAspmForce "force"; }; + systemd.services.nixos-upgrade = { + unitConfig = { + ConditionACPower = true; + }; + }; systemd.services.aspm-force-enable = let