summaryrefslogtreecommitdiff
path: root/custom/tinc
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-07-28 11:13:11 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-07-28 11:13:11 +0200
commit5e003747fd897ef57f5ec0d45f8e06a3df5b54a4 (patch)
tree2e5ab37b5507f81dce9c60cdbb077ec9eb7aa23b /custom/tinc
parent37e7139e8caa9bb683ee23d25d4a56a26fba9ac5 (diff)
downloadnixos-5e003747fd897ef57f5ec0d45f8e06a3df5b54a4.tar
nixos-5e003747fd897ef57f5ec0d45f8e06a3df5b54a4.tar.gz
nixos-5e003747fd897ef57f5ec0d45f8e06a3df5b54a4.tar.bz2
nixos-5e003747fd897ef57f5ec0d45f8e06a3df5b54a4.tar.xz
nixos-5e003747fd897ef57f5ec0d45f8e06a3df5b54a4.zip
and in yggdrasil
Diffstat (limited to 'custom/tinc')
-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}