summaryrefslogtreecommitdiff
path: root/custom/tinc
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-17 20:06:22 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-17 20:06:22 +0200
commitd6a37f91cb304c2025ed8f803265c0a4b072191c (patch)
tree0027a66dcc1aa1a3c5850c91839882424241cb4a /custom/tinc
parentd620828d322dd1f34b95a63857c2e90527ff5aa4 (diff)
downloadnixos-d6a37f91cb304c2025ed8f803265c0a4b072191c.tar
nixos-d6a37f91cb304c2025ed8f803265c0a4b072191c.tar.gz
nixos-d6a37f91cb304c2025ed8f803265c0a4b072191c.tar.bz2
nixos-d6a37f91cb304c2025ed8f803265c0a4b072191c.tar.xz
nixos-d6a37f91cb304c2025ed8f803265c0a4b072191c.zip
rename iface
Diffstat (limited to 'custom/tinc')
-rw-r--r--custom/tinc/def.nix4
-rw-r--r--custom/tinc/yggdrasil.nix4
2 files changed, 4 insertions, 4 deletions
diff --git a/custom/tinc/def.nix b/custom/tinc/def.nix
index 1602e477..2610a13f 100644
--- a/custom/tinc/def.nix
+++ b/custom/tinc/def.nix
@@ -127,7 +127,7 @@ in
127 Name = ${if data.name == null then "$HOST" else data.name} 127 Name = ${if data.name == null then "$HOST" else data.name}
128 DeviceType = ${data.interfaceType} 128 DeviceType = ${data.interfaceType}
129 Device = /dev/net/tun 129 Device = /dev/net/tun
130 Interface = tinc.${network} 130 Interface = ${network}
131 ExperimentalProtocol = no 131 ExperimentalProtocol = no
132 ${data.extraConfig} 132 ${data.extraConfig}
133 ''; 133 '';
@@ -136,7 +136,7 @@ in
136 )); 136 ));
137 137
138 networking.interfaces = flip mapAttrs' cfg.networks (network: data: nameValuePair 138 networking.interfaces = flip mapAttrs' cfg.networks (network: data: nameValuePair
139 ("tinc.${network}") 139 (network)
140 ({ 140 ({
141 virtual = true; 141 virtual = true;
142 virtualType = "${data.interfaceType}"; 142 virtualType = "${data.interfaceType}";
diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix
index 2da48486..175da1ec 100644
--- a/custom/tinc/yggdrasil.nix
+++ b/custom/tinc/yggdrasil.nix
@@ -9,7 +9,7 @@ let
9 #!${pkgs.stdenv.shell} 9 #!${pkgs.stdenv.shell}
10 ${pkgs.nettools}/bin/route add -net 10.141.1.0 netmask 255.255.255.0 gw 10.141.1.1 dev $INTERFACE metric 9999 10 ${pkgs.nettools}/bin/route add -net 10.141.1.0 netmask 255.255.255.0 gw 10.141.1.1 dev $INTERFACE metric 9999
11 ${optionalString cfg.useDNS '' 11 ${optionalString cfg.useDNS ''
12 ${pkgs.openresolv}/bin/resolvconf -m 0 -a tinc.yggdrasil <<EOF 12 ${pkgs.openresolv}/bin/resolvconf -m 0 -a yggdrasil <<EOF
13 domain yggdrasil 13 domain yggdrasil
14 nameserver 10.141.1.1 14 nameserver 10.141.1.1
15 EOF 15 EOF
@@ -20,7 +20,7 @@ let
20 #!${pkgs.stdenv.shell} 20 #!${pkgs.stdenv.shell}
21 ${pkgs.nettools}/bin/route del -net 10.141.1.0 netmask 255.255.255.0 gw 10.141.1.1 dev $INTERFACE 21 ${pkgs.nettools}/bin/route del -net 10.141.1.0 netmask 255.255.255.0 gw 10.141.1.1 dev $INTERFACE
22 ${optionalString cfg.useDNS '' 22 ${optionalString cfg.useDNS ''
23 ${pkgs.openresolv}/bin/resolvconf -d tinc.yggdrasil 23 ${pkgs.openresolv}/bin/resolvconf -d yggdrasil
24 ''} 24 ''}
25 ''; 25 '';
26in { 26in {