summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--custom/tinc/def.nix20
-rw-r--r--custom/tinc/yggdrasil.nix5
2 files changed, 14 insertions, 11 deletions
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
86 ''; 86 '';
87 }; 87 };
88 88
89 scripts = mkOption { 89 scripts = mkOption {
90 default = { }; 90 default = { };
91 type = types.loaOf (types.nullOr types.str); 91 type = types.loaOf (types.nullOr types.str);
92 description = '' 92 description = ''
93 Hook scripts 93 Hook scripts
94 ''; 94 '';
95 }; 95 };
96 96
97 }; 97 };
98 }; 98 };
@@ -111,9 +111,9 @@ in
111 ("tinc/${network}/hosts/${host}") 111 ("tinc/${network}/hosts/${host}")
112 ({ inherit text; }) 112 ({ inherit text; })
113 ) // (flip mapAttrs' data.scripts (scriptName: text: nameValuePair 113 ) // (flip mapAttrs' data.scripts (scriptName: text: nameValuePair
114 ("tinc/${network}/${scriptName}") 114 ("tinc/${network}/${scriptName}")
115 ({ mode = "0555"; inherit text; }) 115 ({ mode = "0555"; inherit text; })
116 )) // { 116 )) // {
117 "tinc/${network}/tinc.conf" = { 117 "tinc/${network}/tinc.conf" = {
118 text = '' 118 text = ''
119 Name = ${if data.name == null then "$HOST" else data.name} 119 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 {
14 inherit name; 14 inherit name;
15 debugLevel = 2; 15 debugLevel = 2;
16 hosts = ( import ./hosts/yggdrasil.nix ); 16 hosts = ( import ./hosts/yggdrasil.nix );
17 extraConfig = connectTo; 17 extraConfig = ''
18 PingTimeout = 10
19 ${connectTo}
20 '';
18 scripts = { 21 scripts = {
19 tinc-up = '' 22 tinc-up = ''
20 #!${stdenv.shell} 23 #!${stdenv.shell}