@cryptotaxi247 / infra-1 / commits / 5de0e107

Re-enable /backup and Hydra DB backup copying. Add time sync for non-NixOS machines.

Eelco Dolstra committed Sep 16, 2013 at 14:46 UTC 5de0e1078648320ec710b6dd035f98f91e5d294c
1 file changed +17 -3
delft/wendy.nix
+17 -3
@@ -5,12 +5,10 @@ with pkgs.lib;
5 {
6 require = [ ./build-machines-dell-r815.nix ./delft-webserver.nix ./sysstat.nix ];
7
8 - /*
8 fileSystems."/backup" =
9 { device = "130.161.158.5:/dxs/users4/group/buildfarm";
10 fsType = "nfs4";
11 };
13 - */
12
13 jobs.mturk_webserver_production =
14 { name = "mturk-webserver-production";
@@ -109,7 +107,7 @@ with pkgs.lib;
107 '';
108
109 services.cron.systemCronJobs =
112 - [ #"15 4 * * * root cp -v /var/backup/postgresql/* /backup/wendy/postgresql/ &> /var/log/backup-db.log"
110 + [ "15 4 * * * root cp -v /var/backup/postgresql/* /backup/wendy/postgresql/ &> /var/log/backup-db.log"
111 ];
112
113 services.radvd.enable = true;
@@ -171,4 +169,20 @@ with pkgs.lib;
169 services.zabbixServer.enable = true;
170 services.zabbixServer.dbServer = "wendy";
171 services.zabbixServer.dbPassword = import ./zabbix-password.nix;
172 +
173 + # Poor man's time sync for the non-NixOS machines.
174 + systemd.services.fix-time =
175 + { path = [ pkgs.openssh ];
176 + script =
177 + ''
178 + ssh root@beastie "date $(date +'%Y%m%d%H%M.%S')" || true
179 + ssh root@demon "date $(date +'%Y%m%d%H%M.%S')" || true
180 + '';
181 + };
182 +
183 + systemd.timers.fix-time =
184 + { wantedBy = [ "timers.target" ];
185 + timerConfig.OnCalendar = "*:03";
186 + };
187 +
188 }