summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-04-27 14:39:00 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-04-27 14:39:00 +0200
commit83517ddd3329aa3ea9f0299d0e5480a8cd89a8bb (patch)
tree3557ada25e3ed53c30d79709c20174b91663c799
parent8bb6eb2d7a7229fdbab24e05e3b17a0895b670e8 (diff)
downloadnixos-83517ddd3329aa3ea9f0299d0e5480a8cd89a8bb.tar
nixos-83517ddd3329aa3ea9f0299d0e5480a8cd89a8bb.tar.gz
nixos-83517ddd3329aa3ea9f0299d0e5480a8cd89a8bb.tar.bz2
nixos-83517ddd3329aa3ea9f0299d0e5480a8cd89a8bb.tar.xz
nixos-83517ddd3329aa3ea9f0299d0e5480a8cd89a8bb.zip
occasionally call all known remotes
-rw-r--r--custom/uucp.nix12
1 files changed, 12 insertions, 0 deletions
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 {
100 description = "Debug file"; 100 description = "Debug file";
101 }; 101 };
102 102
103 interval = mkOption {
104 type = types.nullOr types.stri;
105 default = "00 * * * *";
106 description = ''
107 Specification of when to run `uucico' in format used by cron
108 The default is to do so every hour
109 '';
110 };
111
103 extraConfig = mkOption { 112 extraConfig = mkOption {
104 type = types.string; 113 type = types.string;
105 default = ""; 114 default = "";
@@ -189,5 +198,8 @@ in {
189 environment.systemPackages = with pkgs; [ 198 environment.systemPackages = with pkgs; [
190 uucp 199 uucp
191 ]; 200 ];
201
202 services.cron.systemCronJobs = optional (config.services.uucp.interval /= null)
203 (map (name: "${config.services.uucp.interval} root /var/setuid-wrappers/uucico -D -s ${name}") config.services.uucp.remoteNodes);
192 }; 204 };
193} 205}