diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-08-05 23:30:33 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-08-05 23:30:33 +0200 |
commit | 736d0a48409a98db01d0a975abb76560779ee5e6 (patch) | |
tree | cfb0e84fada4fdb604ebf18f6daf80d78c6e34e0 | |
parent | 015a7e7c69857d9e919561ef2f141b1e2497e359 (diff) | |
download | nixos-736d0a48409a98db01d0a975abb76560779ee5e6.tar nixos-736d0a48409a98db01d0a975abb76560779ee5e6.tar.gz nixos-736d0a48409a98db01d0a975abb76560779ee5e6.tar.bz2 nixos-736d0a48409a98db01d0a975abb76560779ee5e6.tar.xz nixos-736d0a48409a98db01d0a975abb76560779ee5e6.zip |
Try generic uucico timer
-rw-r--r-- | custom/uucp.nix | 17 |
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" '' |