fix: use autoupgrade only on AC

This commit is contained in:
2025-10-19 13:31:31 +02:00
parent 7564c5d740
commit 40743442e9

View File

@@ -1,6 +1,13 @@
{ config, ... }:
{ config, lib, pkgs, ... }:
{
system.autoUpgrade.enable = true;
system.autoUpgrade.allowReboot = false;
# Skip auto-upgrade when on battery to save power
systemd.services.nixos-upgrade = {
unitConfig = {
ConditionACPower = true;
};
};
}