diff options
-rw-r--r-- | custom/tinc/yggdrasil.nix | 7 | ||||
-rw-r--r-- | ymir.nix | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/custom/tinc/yggdrasil.nix b/custom/tinc/yggdrasil.nix index ef673c80..4191d2c4 100644 --- a/custom/tinc/yggdrasil.nix +++ b/custom/tinc/yggdrasil.nix | |||
@@ -1,10 +1,9 @@ | |||
1 | { config | 1 | { stdenv |
2 | , stdenv | ||
3 | , nettools | 2 | , nettools |
4 | , openresolv | 3 | , openresolv |
4 | , name | ||
5 | , connect ? true | 5 | , connect ? true |
6 | , ipConf ? {} | 6 | , ipConf ? {} |
7 | , ... | ||
8 | }: | 7 | }: |
9 | 8 | ||
10 | 9 | ||
@@ -12,7 +11,7 @@ let | |||
12 | connectTo = if connect then "" else "ConnectTo = ymir"; | 11 | connectTo = if connect then "" else "ConnectTo = ymir"; |
13 | in { | 12 | in { |
14 | "yggdrasil" = { | 13 | "yggdrasil" = { |
15 | name = config.networking.hostName; | 14 | inherit name; |
16 | debugLevel = 2; | 15 | debugLevel = 2; |
17 | hosts = ( import ./yggdrasil-hosts.nix ); | 16 | hosts = ( import ./yggdrasil-hosts.nix ); |
18 | extraConfig = connectTo; | 17 | extraConfig = connectTo; |
@@ -145,7 +145,9 @@ in { | |||
145 | chmod 0640 /etc/shadow | 145 | chmod 0640 /etc/shadow |
146 | ''; | 146 | ''; |
147 | 147 | ||
148 | services.customTinc.networks = (pkgs.callPackage ./custom/tinc/yggdrasil.nix { | 148 | services.customTinc.networks = ((import ./custom/tinc/yggdrasil.nix) { |
149 | inherit (pkgs) stdenv nettools openresolv; | ||
150 | name = "ymir"; | ||
149 | connect = false; | 151 | connect = false; |
150 | ipConf = { | 152 | ipConf = { |
151 | ip4 = [ { address = "10.141.4.1"; prefixLength = 16; } ]; | 153 | ip4 = [ { address = "10.141.4.1"; prefixLength = 16; } ]; |