Skip to content

Commit 7a4ad04

Browse files
authored
Merge pull request #177 from booxter/auto-reboot
Enable auto-reboot for nixos upgrades
2 parents dfdfbc8 + b819f75 commit 7a4ad04

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

nixos/cachevm/default.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@ in
7979
8080
8080
];
8181

82-
# auto-update cachevm on a separate schedule so that it doesn't clash with
83-
# machines that use the cache for their auto-updates.
84-
system.autoUpgrade.dates = lib.mkForce "Sun 06:00";
82+
# Keep cachevm upgrades on a separate schedule so they don't clash with
83+
# machines that use this cache for their own auto-updates.
84+
# Run inside the global reboot window (01:00-05:00).
85+
system.autoUpgrade.dates = lib.mkForce "Sun 01:00";
8586

8687
systemd.services.atticd.unitConfig.RequiresMountsFor = "/cache";
8788
}

nixos/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ in
7878
dates = lib.mkDefault "Sat 03:00";
7979
randomizedDelaySec = "45min";
8080
persistent = true;
81+
allowReboot = true;
82+
rebootWindow = {
83+
lower = "01:00";
84+
upper = "05:00";
85+
};
8186
};
8287

8388
time.timeZone = "America/New_York";

0 commit comments

Comments
 (0)