2024-06-09 20:48:07 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
# networking.nat.enable = true;
|
|
|
|
# networking.nat.externalInterface = "enp0s31f6";
|
|
|
|
# networking.nat.internalInterfaces = "wg0";
|
|
|
|
networking.firewall = {
|
|
|
|
allowedUDPPorts = [51820];
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.wireguard.interfaces = {
|
2024-06-09 21:04:13 +02:00
|
|
|
wg0 = {
|
2024-06-09 21:48:40 +02:00
|
|
|
ips = ["2a0f:be01:fe:fa1::1/64"];
|
2024-06-09 20:48:07 +02:00
|
|
|
|
2024-06-09 21:04:13 +02:00
|
|
|
listenPort = 51820;
|
2024-06-09 20:48:07 +02:00
|
|
|
|
2024-06-09 21:04:13 +02:00
|
|
|
privateKeyFile = "/home/xqtc/wireguard-keys/private";
|
2024-06-09 20:48:07 +02:00
|
|
|
|
2024-06-09 21:04:13 +02:00
|
|
|
peers = [
|
|
|
|
{
|
|
|
|
#anner
|
|
|
|
publicKey = "5ar4lh3Ra4TRmUJeeBtPgDvZnAkGssJDUN53y9oa3So=";
|
2024-06-10 00:57:33 +02:00
|
|
|
allowedIPs = ["2a0f:be01::/40"];
|
2024-06-09 21:04:13 +02:00
|
|
|
endpoint = "[2a0f:be01::1]:51822";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-06-09 20:48:07 +02:00
|
|
|
};
|
|
|
|
}
|