diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-04-12 19:35:23 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-04-12 19:35:23 +0200 |
commit | 3f6494f5155bae814bb4dd04269335e1cb4b42d6 (patch) | |
tree | df156cbedf3a631e2404724e7f0c6fa1e2cb922e /custom/uucp.nix | |
parent | 3d240cd432e0374dd2292756b53c003f96cd0e8f (diff) | |
download | nixos-3f6494f5155bae814bb4dd04269335e1cb4b42d6.tar nixos-3f6494f5155bae814bb4dd04269335e1cb4b42d6.tar.gz nixos-3f6494f5155bae814bb4dd04269335e1cb4b42d6.tar.bz2 nixos-3f6494f5155bae814bb4dd04269335e1cb4b42d6.tar.xz nixos-3f6494f5155bae814bb4dd04269335e1cb4b42d6.zip |
Uucp calling using systemd
Diffstat (limited to 'custom/uucp.nix')
-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 | ''; |