fix: use autoupgrade only on AC
This commit is contained in:
parent
7564c5d740
commit
40743442e9
1 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue