{ 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; }; }; }