From 84c3acb643d94f3dc0432165691e1c31c8f7385f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 4 Nov 2015 14:03:06 +0100 Subject: laeradhr --- custom/tinc/laeradhr.nix | 62 +++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 32 deletions(-) (limited to 'custom') diff --git a/custom/tinc/laeradhr.nix b/custom/tinc/laeradhr.nix index 7db4bec8..8471f020 100644 --- a/custom/tinc/laeradhr.nix +++ b/custom/tinc/laeradhr.nix @@ -1,36 +1,34 @@ -{ config, pkgs, ... }: +{ stdenv +, nettools +, openresolv +, name +, connect ? true +, ipConf ? {} +}: + let - name = "unknown"; - ip = "xxx.xxx.xxx.xxx"; + connectTo = if connect then "" else "ConnectTo = ymir"; in { - config.services.tinc = { - networks = { - "laeradhr" = { - name = name; - debugLevel = 2; - hosts = ( import ./laeradhr-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.142.0.2 dev $INTERFACE metric 9999 - ${pkgs.openresolv}/bin/resolvconf -m 0 -a tinc.laeradhr <