Change wireguard to v6
This commit is contained in:
parent
9c0bca2f93
commit
7cae0dcd13
|
@ -41,6 +41,7 @@ with lib;
|
|||
v4-p = "10.0.0";
|
||||
in rec {
|
||||
hera = "${p}::1";
|
||||
hera-wg-host = "${p}::100:0:1";
|
||||
|
||||
hera-v4 = "213.136.94.190";
|
||||
|
||||
|
|
|
@ -33,12 +33,12 @@ in {
|
|||
peers = [{
|
||||
publicKey = wireguard.pub.hera;
|
||||
allowedIPs = [ "::/0" ];
|
||||
endpoint = "${hosts.hera-v4}:${builtins.toString wireguard.port}";
|
||||
endpoint = "[${hosts.hera-wg-host}]:${builtins.toString wireguard.port}";
|
||||
presharedKeyFile = "/etc/nixos/common/secret/wireguard-psk";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
postSetup =
|
||||
[ "${pkgs.iproute}/bin/ip route add ${prefix}::/64 dev m0wire" ];
|
||||
[ "${pkgs.iproute}/bin/ip route add ${prefix}::/96 dev m0wire" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -14,6 +14,9 @@ in {
|
|||
ipv6.addresses = [{
|
||||
address = hosts.hera;
|
||||
prefixLength = 128;
|
||||
} {
|
||||
address = hosts.hera-wg-host;
|
||||
prefixLength = 128;
|
||||
}];
|
||||
};
|
||||
defaultGateway = "213.136.94.1";
|
||||
|
|
Loading…
Reference in a new issue