From 17d901fdd0f0cbd6fddbca62bb4b4d835e9f059b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 2 Jul 2015 20:48:08 +0200 Subject: First work an tinc --- custom/tinc/yggdrasil.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 custom/tinc/yggdrasil.nix (limited to 'custom/tinc/yggdrasil.nix') diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix new file mode 100644 index 00000000..1d642840 --- /dev/null +++ b/custom/tinc/yggdrasil.nix @@ -0,0 +1,33 @@ +{ config, pkgs, name, ip, ... }: + +{ + 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 <