From 655e708dfb3b918c78e05649e9e53407a970374a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 29 Oct 2017 01:45:15 +0200 Subject: Fancier yggdrasilTinc --- custom/tinc/yggdrasil.nix | 119 +++++++++++++++++++++++++++++++--------------- 1 file changed, 81 insertions(+), 38 deletions(-) (limited to 'custom') diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix index 46d815a3..035b9b10 100644 --- a/custom/tinc/yggdrasil.nix +++ b/custom/tinc/yggdrasil.nix @@ -1,42 +1,85 @@ -{ stdenv -, nettools -, openresolv -, name -, connect ? true -, ipConf ? {} -, useDNS ? true -}: - -with stdenv.lib; - -{ - "yggdrasil" = { - inherit name; - debugLevel = 2; - hosts = ( import ./hosts/yggdrasil.nix ); - extraConfig = '' - PingTimeout = 10 - ${optionalString connect "ConnectTo = ymir"} - ''; - scripts = { - "hosts/borealis-up" = '' - #!${stdenv.shell} - ${nettools}/bin/route add -net 10.141.1.0 netmask 255.255.255.0 gw 10.141.1.1 dev $INTERFACE metric 9999 - ${optionalString useDNS '' - ${openresolv}/bin/resolvconf -m 0 -a tinc.yggdrasil <