fix: use autoupgrade only on AC
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
{ config, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
system.autoUpgrade.enable = true;
|
system.autoUpgrade.enable = true;
|
||||||
system.autoUpgrade.allowReboot = false;
|
system.autoUpgrade.allowReboot = false;
|
||||||
|
|
||||||
|
# Skip auto-upgrade when on battery to save power
|
||||||
|
systemd.services.nixos-upgrade = {
|
||||||
|
unitConfig = {
|
||||||
|
ConditionACPower = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user