dn42: fix wireguard pointopoint routes
This commit is contained in:
parent
5e34762669
commit
b28eb471f8
|
@ -76,9 +76,12 @@ in {
|
|||
let
|
||||
wireguardNeighbors = lib.filterAttrs (_: conf: conf ? wireguard) neighbors;
|
||||
in
|
||||
builtins.mapAttrs (_: conf: {
|
||||
builtins.mapAttrs (name: conf: {
|
||||
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 = [ ({
|
||||
inherit (conf.wireguard) publicKey;
|
||||
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
||||
|
|
Loading…
Reference in New Issue