macs: reboot every sunday between 0:00 and 3:00
Imported from https://github.com/nix-community/infra/blob/master/modules/darwin/common/reboot.nix?rgh-link-date=2026-05-19T05%3A34%3A54.000Z Closes: #1042
Martin Weinelt committed
Jun 18, 2026 at 19:59 UTC
01cf700adcaed8a1f10d9ee574361e983e062a26
3 files changed
+22
macs/common/reboot.nix
new
+20
@@ -0,0 +1,20 @@
1
+{
2
+ # reboot every sunday between 00:00 and 03:00
3
+ launchd.daemons.reboot = {
4
+ script = ''
5
+ date
6
+ /sbin/shutdown -r "+$(( $RANDOM % ( 3 * 60 ) ))"
7
+ '';
8
+ serviceConfig = {
9
+ StartCalendarInterval = [
10
+ {
11
+ Hour = 0;
12
+ Minute = 0;
13
+ Weekday = 0;
14
+ }
15
+ ];
16
+ StandardErrorPath = "/var/log/reboot.log";
17
+ StandardOutPath = "/var/log/reboot.log";
18
+ };
19
+ };
20
+}
macs/ofborg.nix
+1
@@ -10,6 +10,7 @@
10
./common/node-exporter.nix
11
./common/ofborg.nix
12
./common/ofborg-queue-builder.nix
13
+ ./common/reboot.nix
14
./common/shells.nix
15
./common/spotlight.nix
16
./common/ssh.nix
macs/production.nix
+1
@@ -3,6 +3,7 @@
3
./common/hydra-queue-builder.nix
4
./common/nix.nix
5
./common/node-exporter.nix
6
+ ./common/reboot.nix
7
./common/shells.nix
8
./common/spotlight.nix
9
./common/ssh.nix