From ea275446d52f67f90b955d115b4c446a5505c244 Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 24 Apr 2020 19:28:37 +0200 Subject: [PATCH] dn42: fix wireguard --- hosts/containers/dn42/configuration.nix | 30 +++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/hosts/containers/dn42/configuration.nix b/hosts/containers/dn42/configuration.nix index c5bb4256..25eff957 100644 --- a/hosts/containers/dn42/configuration.nix +++ b/hosts/containers/dn42/configuration.nix @@ -70,20 +70,22 @@ in { servers = builtins.mapAttrs (name: conf: mkServer name conf) openvpnNeighbors; }; - networking.wireguard.enable = true; - networking.wireguard.interfaces = - let - wireguardNeighbors = lib.filterAttrs (_: conf: conf ? wireguard) neighbors; - in - builtins.mapAttrs (_: conf: { - inherit (conf.wireguard) listenPort privateKey; - ips = [ "${address4}/32" "${address6}/128" ]; - peers = [ { - inherit (conf.wireguard) endpoint publicKey; - allowedIPs = [ "0.0.0.0/0" "::0/0" ]; - persistentKeepalive = 30; - } ]; - }) wireguardNeighbors; + networking.wireguard = { + enable = true; + interfaces = + let + wireguardNeighbors = lib.filterAttrs (_: conf: conf ? wireguard) neighbors; + in + builtins.mapAttrs (_: conf: { + inherit (conf.wireguard) listenPort privateKey; + ips = [ "${address4}/32" "${address6}/128" ]; + peers = [ { + inherit (conf.wireguard) endpoint publicKey; + allowedIPs = [ "0.0.0.0/0" "::0/0" ]; + persistentKeepalive = 30; + } ]; + }) wireguardNeighbors; + }; services.bird2 = { enable = true;