From 83517ddd3329aa3ea9f0299d0e5480a8cd89a8bb Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 27 Apr 2016 14:39:00 +0200 Subject: occasionally call all known remotes --- custom/uucp.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/custom/uucp.nix b/custom/uucp.nix index 03a764ec..652ba0d9 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix @@ -100,6 +100,15 @@ in { description = "Debug file"; }; + interval = mkOption { + type = types.nullOr types.stri; + default = "00 * * * *"; + description = '' + Specification of when to run `uucico' in format used by cron + The default is to do so every hour + ''; + }; + extraConfig = mkOption { type = types.string; default = ""; @@ -189,5 +198,8 @@ in { environment.systemPackages = with pkgs; [ uucp ]; + + services.cron.systemCronJobs = optional (config.services.uucp.interval /= null) + (map (name: "${config.services.uucp.interval} root /var/setuid-wrappers/uucico -D -s ${name}") config.services.uucp.remoteNodes); }; } -- cgit v1.2.3