From 3f5c903088bfe9b4c16821248f684a4252b394e5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 31 Oct 2016 16:59:15 +0100 Subject: cleanup --- custom/tinc/laeradhr.nix | 16 ++++++++++------ custom/tinc/yggdrasil.nix | 13 +++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'custom/tinc') diff --git a/custom/tinc/laeradhr.nix b/custom/tinc/laeradhr.nix index abf309f0..e66b273d 100644 --- a/custom/tinc/laeradhr.nix +++ b/custom/tinc/laeradhr.nix @@ -7,27 +7,31 @@ , useDNS ? true }: +with stdenv.lib; -let - connectTo = if connect then "" else "ConnectTo = ymir"; -in { +{ "laeradhr" = { inherit name; debugLevel = 2; hosts = ( import ./hosts/laeradhr.nix ); - extraConfig = connectTo; + extraConfig = '' + ${optionalString connect "ConnectTo = ymir"} + ''; scripts = { tinc-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 - ${if useDNS then ''${openresolv}/bin/resolvconf -m 0 -a tinc.laeradhr <