From 65c95bf40c33277483c39104220315a3192a86e0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 13 Aug 2018 09:46:55 +0200 Subject: ... --- custom/tinc/def.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'custom') diff --git a/custom/tinc/def.nix b/custom/tinc/def.nix index bbf9f483..0129f251 100644 --- a/custom/tinc/def.nix +++ b/custom/tinc/def.nix @@ -165,12 +165,10 @@ in after = [ "network-interfaces.target" ]; restartTriggers = [ config.environment.etc."tinc/${network}/tinc.conf".source ] ++ mapAttrsToList (host: _ : config.environment.etc."tinc/${network}/hosts/${host}".source) data.hosts; + path = [ data.package ]; serviceConfig = { Type = "simple"; PIDFile = "/run/tinc.${network}.pid"; - ExecStartPre = '' - ${data.package}/bin/tinc -n ${network} --pidfile /run/tinc.${network}.pid --batch fsck - ''; ExecStart = '' ${data.package}/bin/tincd -D -U tinc.${network} -n ${network} --pidfile /run/tinc.${network}.pid -d ${toString data.debugLevel} ''; @@ -181,12 +179,14 @@ in # Determine how we should generate our keys if type tinc >/dev/null 2>&1; then # Tinc 1.1+ uses the tinc helper application for key generation - [ -f "/etc/tinc/${network}/ed25519_key.priv" ] || tinc -n ${network} generate-ed25519-keys - [ -f "/etc/tinc/${network}/rsa_key.priv" ] || tinc -n ${network} generate-rsa-keys 4096 + [ -f "/etc/tinc/${network}/ed25519_key.priv" ] || tinc -n ${network} --pidfile /run/tinc.${network}.pid generate-ed25519-keys + [ -f "/etc/tinc/${network}/rsa_key.priv" ] || tinc -n ${network} --pidfile /run/tinc.${network}.pid generate-rsa-keys 4096 else # Tinc 1.0 uses the tincd application [ -f "/etc/tinc/${network}/rsa_key.priv" ] || tincd -n ${network} -K 4096 fi + + tinc -n ${network} --pidfile /run/tinc.${network}.pid --batch fsck ''; }) ); -- cgit v1.2.3