Periodically update channels
This ensures http://nixos.org/nixos/packages.html shows a current set of packages.
Eelco Dolstra committed
May 20, 2015 at 11:53 UTC
d22a926128bed7305d6a5521b369e64683b06a0c
1 file changed
+13
-2
nixos-org/webserver.nix
+13
-2
@@ -290,7 +290,7 @@ in
290
};
291
292
systemd.services.mirror-tarballs =
293
- { description = "Mirror Nixpkgs tarballs";
293
+ { description = "Mirror Nixpkgs Tarballs";
294
path = [ config.nix.package pkgs.curl pkgs.git ];
295
#environment.DRY_RUN = "1";
296
environment.NIX_PATH = "nixpkgs=/home/tarball-mirror/nixpkgs";
@@ -299,6 +299,7 @@ in
299
environment.NIX_TARBALLS_CACHE = "/tarballs";
300
environment.PERL5LIB = "/run/current-system/sw/lib/perl5/site_perl";
301
serviceConfig.User = "tarball-mirror";
302
+ serviceConfig.Type = "oneshot";
303
script =
304
''
305
export NIX_CURL_FLAGS="--silent --show-error --connect-timeout 30"
@@ -310,13 +311,23 @@ in
311
startAt = "05:30";
312
};
313
314
+ systemd.services.update-channels =
315
+ { description = "Update Channels";
316
+ environment.CURL_CA_BUNDLE = "/etc/ssl/certs/ca-bundle.crt";
317
+ environment.HOME = "/root";
318
+ serviceConfig.Type = "oneshot";
319
+ serviceConfig.ExecStart = "${config.nix.package}/bin/nix-channel --update";
320
+ startAt = "*:0/33";
321
+ };
322
+
323
systemd.services.update-homepage =
314
- { description = "Update nixos.org homepage";
324
+ { description = "Update nixos.org Homepage";
325
path = [ config.nix.package pkgs.git pkgs.bash ];
326
serviceConfig.User = "eelco";
327
environment.NIX_PATH = "/nix/var/nix/profiles/per-user/root/channels/nixos";
328
environment.NIX_REMOTE = "daemon";
329
environment.CURL_CA_BUNDLE = "/etc/ssl/certs/ca-bundle.crt";
330
+ serviceConfig.Type = "oneshot";
331
script =
332
''
333
cd /home/eelco/nixos-homepage