Add a job for automatically updating the homepage
Eelco Dolstra committed
Jun 2, 2014 at 11:19 UTC
3cec54894847e731e4fffe69d8972dfb5245f063
1 file changed
+17
-3
nixos-org/webserver.nix
+17
-3
@@ -33,9 +33,11 @@ let
33
{ urlPath = "/nixops/manual";
34
dir = "/releases/nixops/latest/manual";
35
}
36
+ /*
37
{ urlPath = "/new";
38
dir = "/home/eelco/nixos-homepage-new";
39
}
40
+ */
41
];
42
43
extraConfig =
@@ -313,11 +315,23 @@ in
315
git pull
316
exec /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/maintainers/scripts/copy-tarballs.pl
317
'';
318
+ startAt = "05:30";
319
};
320
318
- systemd.timers.mirror-tarballs =
319
- { wantedBy = [ "timers.target" ];
320
- timerConfig.OnCalendar = "05:30";
321
+ systemd.services.update-homepage =
322
+ { description = "Update nixos.org homepage";
323
+ path = [ config.nix.package pkgs.git pkgs.bash ];
324
+ serviceConfig.User = "eelco";
325
+ environment.NIX_PATH = "/nix/var/nix/profiles/per-user/root/channels/nixos";
326
+ environment.NIX_REMOTE = "daemon";
327
+ environment.CURL_CA_BUNDLE = "/etc/ssl/certs/ca-bundle.crt";
328
+ script =
329
+ ''
330
+ cd /home/eelco/nixos-homepage
331
+ git pull
332
+ exec nix-shell --command 'make UPDATE=1'
333
+ '';
334
+ startAt = "*:0/20";
335
};
336
337
system.activationScripts.setShmMax =