2023-08-22 09:05:13 +10:00
|
|
|
{ lib, ... }:
|
2022-08-10 13:02:19 +02:00
|
|
|
{
|
2023-08-22 09:05:13 +10:00
|
|
|
system.autoUpgrade.enable = lib.mkDefault true;
|
2022-08-10 13:02:19 +02:00
|
|
|
system.autoUpgrade.flake = "github:nix-community/infra";
|
2022-10-01 22:10:21 +10:00
|
|
|
system.autoUpgrade.dates = "hourly";
|
2023-04-29 17:00:35 +10:00
|
|
|
system.autoUpgrade.flags = [ "--option" "accept-flake-config" "true" "--option" "tarball-ttl" "0" ];
|
2023-08-05 08:01:56 +02:00
|
|
|
|
|
|
|
# Restart the upgrade service if it fails twice in 5 seconds.
|
|
|
|
systemd.services.nixos-upgrade = {
|
|
|
|
unitConfig.StartLimitBurst = 2;
|
|
|
|
unitConfig.StartLimitIntervalSec = 5;
|
|
|
|
serviceConfig.Restart = "on-failure";
|
|
|
|
};
|
2022-08-10 13:02:19 +02:00
|
|
|
}
|