From 5e003747fd897ef57f5ec0d45f8e06a3df5b54a4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 28 Jul 2016 11:13:11 +0200 Subject: and in yggdrasil --- custom/tinc/def.nix | 20 ++++++++++---------- custom/tinc/yggdrasil.nix | 5 ++++- 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'custom') diff --git a/custom/tinc/def.nix b/custom/tinc/def.nix index 423f1ddb..58c5237c 100644 --- a/custom/tinc/def.nix +++ b/custom/tinc/def.nix @@ -86,13 +86,13 @@ in ''; }; - scripts = mkOption { - default = { }; - type = types.loaOf (types.nullOr types.str); - description = '' - Hook scripts - ''; - }; + scripts = mkOption { + default = { }; + type = types.loaOf (types.nullOr types.str); + description = '' + Hook scripts + ''; + }; }; }; @@ -111,9 +111,9 @@ in ("tinc/${network}/hosts/${host}") ({ inherit text; }) ) // (flip mapAttrs' data.scripts (scriptName: text: nameValuePair - ("tinc/${network}/${scriptName}") - ({ mode = "0555"; inherit text; }) - )) // { + ("tinc/${network}/${scriptName}") + ({ mode = "0555"; inherit text; }) + )) // { "tinc/${network}/tinc.conf" = { text = '' Name = ${if data.name == null then "$HOST" else data.name} diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix index 15cd7932..7c028824 100644 --- a/custom/tinc/yggdrasil.nix +++ b/custom/tinc/yggdrasil.nix @@ -14,7 +14,10 @@ in { inherit name; debugLevel = 2; hosts = ( import ./hosts/yggdrasil.nix ); - extraConfig = connectTo; + extraConfig = '' + PingTimeout = 10 + ${connectTo} + ''; scripts = { tinc-up = '' #!${stdenv.shell} -- cgit v1.2.3