From 736d0a48409a98db01d0a975abb76560779ee5e6 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 5 Aug 2017 23:30:33 +0200 Subject: Try generic uucico timer --- custom/uucp.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'custom') 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 { ExecStart = "${config.security.wrapperDir}/uucico -D -S %i"; }; }; - - systemd.timers = let - timer = name: { - name = "uucico@${name}"; - value.timerConfig = { - OnUnitInactiveSec = cfg.interval; - }; - }; - in builtins.listToAttrs (map timer (if (cfg.interval != null) then cfg.remoteNodes else [])); + systemd.timers."uucico@" = { + timerConfig.OnUnitInactiveSec = cfg.interval; + }; + + systemd.targets."multi-user" = { + wants = map (name: "uucico@${name}.timer") cfg.remoteNodes; + }; + networking.networkmanager.dispatcherScripts = optional cfg.nmDispatch { type = "basic"; source = pkgs.writeScript "callRemotes.sh" '' -- cgit v1.2.3