dn42: fix wireguard pointopoint routes
This commit is contained in:
parent
5e34762669
commit
b28eb471f8
|
@ -76,9 +76,12 @@ in {
|
||||||
let
|
let
|
||||||
wireguardNeighbors = lib.filterAttrs (_: conf: conf ? wireguard) neighbors;
|
wireguardNeighbors = lib.filterAttrs (_: conf: conf ? wireguard) neighbors;
|
||||||
in
|
in
|
||||||
builtins.mapAttrs (_: conf: {
|
builtins.mapAttrs (name: conf: {
|
||||||
inherit (conf.wireguard) listenPort privateKey;
|
inherit (conf.wireguard) listenPort privateKey;
|
||||||
ips = [ "${address4}/32" "${address6}/128" ];
|
ips = [ "${address4}/32" "${address6}/64" ];
|
||||||
|
postSetup = ''
|
||||||
|
${pkgs.iproute}/bin/ip route add ${address4}/32 dev ${name}
|
||||||
|
'';
|
||||||
peers = [ ({
|
peers = [ ({
|
||||||
inherit (conf.wireguard) publicKey;
|
inherit (conf.wireguard) publicKey;
|
||||||
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
||||||
|
|
Loading…
Reference in New Issue