summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-08-05 23:30:33 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2017-08-05 23:30:33 +0200
commit736d0a48409a98db01d0a975abb76560779ee5e6 (patch)
treecfb0e84fada4fdb604ebf18f6daf80d78c6e34e0 /custom
parent015a7e7c69857d9e919561ef2f141b1e2497e359 (diff)
downloadnixos-736d0a48409a98db01d0a975abb76560779ee5e6.tar
nixos-736d0a48409a98db01d0a975abb76560779ee5e6.tar.gz
nixos-736d0a48409a98db01d0a975abb76560779ee5e6.tar.bz2
nixos-736d0a48409a98db01d0a975abb76560779ee5e6.tar.xz
nixos-736d0a48409a98db01d0a975abb76560779ee5e6.zip
Try generic uucico timer
Diffstat (limited to 'custom')
-rw-r--r--custom/uucp.nix17
1 files changed, 8 insertions, 9 deletions
diff --git a/custom/uucp.nix b/custom/uucp.nix
index b287378d..add9704c 100644
--- a/custom/uucp.nix
+++ b/custom/uucp.nix
@@ -282,16 +282,15 @@ in {
282 ExecStart = "${config.security.wrapperDir}/uucico -D -S %i"; 282 ExecStart = "${config.security.wrapperDir}/uucico -D -S %i";
283 }; 283 };
284 }; 284 };
285
286 systemd.timers = let
287 timer = name: {
288 name = "uucico@${name}";
289 value.timerConfig = {
290 OnUnitInactiveSec = cfg.interval;
291 };
292 };
293 in builtins.listToAttrs (map timer (if (cfg.interval != null) then cfg.remoteNodes else []));
294 285
286 systemd.timers."uucico@" = {
287 timerConfig.OnUnitInactiveSec = cfg.interval;
288 };
289
290 systemd.targets."multi-user" = {
291 wants = map (name: "uucico@${name}.timer") cfg.remoteNodes;
292 };
293
295 networking.networkmanager.dispatcherScripts = optional cfg.nmDispatch { 294 networking.networkmanager.dispatcherScripts = optional cfg.nmDispatch {
296 type = "basic"; 295 type = "basic";
297 source = pkgs.writeScript "callRemotes.sh" '' 296 source = pkgs.writeScript "callRemotes.sh" ''