diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/uucp.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/custom/uucp.nix b/custom/uucp.nix index 239ec476..a39cf18b 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix | |||
@@ -275,7 +275,15 @@ in { | |||
275 | uucp | 275 | uucp |
276 | ]; | 276 | ]; |
277 | 277 | ||
278 | services.cron.systemCronJobs = (map (name: "${cfg.interval} ${config.security.wrapperDir}/uucico -D -S ${name}") (if (cfg.interval != null) then cfg.remoteNodes else [])); | 278 | systemd.services."uucico@" = { |
279 | serviceConfig = { | ||
280 | User = "uucp"; | ||
281 | Type = "oneshot"; | ||
282 | ExecStart = "${config.security.wrapperDir}/uucico -D -S %i"; | ||
283 | }; | ||
284 | }; | ||
285 | |||
286 | services.cron.systemCronJobs = (map (name: "${cfg.interval} ${pkgs.systemd}/bin/systemctl start uucico@${name}.service") (if (cfg.interval != null) then cfg.remoteNodes else [])); | ||
279 | 287 | ||
280 | networking.networkmanager.dispatcherScripts = optional cfg.nmDispatch { | 288 | networking.networkmanager.dispatcherScripts = optional cfg.nmDispatch { |
281 | type = "basic"; | 289 | type = "basic"; |
@@ -286,7 +294,7 @@ in { | |||
286 | 294 | ||
287 | case "''${2}" in | 295 | case "''${2}" in |
288 | (?(vpn-)up) | 296 | (?(vpn-)up) |
289 | ${concatMapStringsSep " \n" (name: "${config.security.wrapperDir}/uucico -D -S ${name}") cfg.remoteNodes} | 297 | ${concatMapStringsSep " \n" (name: "${pkgs.systemd}/bin/systemctl start uucico@${name}.service") cfg.remoteNodes} |
290 | ;; | 298 | ;; |
291 | esac | 299 | esac |
292 | ''; | 300 | ''; |