From 7278996bf80f2712537f821fffc48fdec69d8478 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 4 Nov 2015 13:40:18 +0100 Subject: tinc rewrite --- custom/tinc/yggdrasil.nix | 57 +++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 27 deletions(-) (limited to 'custom/tinc/yggdrasil.nix') diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix index 4c19e0e7..a4309278 100644 --- a/custom/tinc/yggdrasil.nix +++ b/custom/tinc/yggdrasil.nix @@ -1,30 +1,33 @@ -{ config, pkgs, name, ip }: +{ stdenv +, nettools +, openresolv +, connect ? true +, ipConf ? {} +} -{ - config.services.tinc = { - networks = { - "yggdrasil" = { - name = name; - debugLevel = 2; - hosts = ( import ./yggdrasil-hosts.nix ); - extraConfig = "ConnectTo = surtr"; - scripts = { - tinc-up = '' - #!${pkgs.stdenv.shell} - ${pkgs.nettools}/bin/route add -net 10.141.1.0 netmask 255.255.255.0 gw 10.141.1.1 dev $INTERFACE metric 9999 - ${pkgs.openresolv}/bin/resolvconf -m 0 -a tinc.yggdrasil <