2024-06-09 20:48:07 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
networking.firewall = {
|
|
|
|
allowedUDPPorts = [51820];
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.wireguard.interfaces = {
|
2024-06-09 21:04:13 +02:00
|
|
|
wg0 = {
|
2024-06-15 23:08:20 +02:00
|
|
|
ips = [
|
|
|
|
/*
|
|
|
|
"2a0f:be01:fe:fa1::1/64"
|
|
|
|
*/
|
|
|
|
"2a01:4f8:10a:1aab:f000::1/80"
|
|
|
|
];
|
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 = [
|
2024-07-15 15:19:54 +02:00
|
|
|
# {
|
|
|
|
# #anner
|
|
|
|
# publicKey = "5ar4lh3Ra4TRmUJeeBtPgDvZnAkGssJDUN53y9oa3So=";
|
|
|
|
# allowedIPs = [
|
|
|
|
# "2a0f:be01:0:100::/64"
|
|
|
|
# "2a0f:be01:0:200::/64"
|
|
|
|
# "2a0f:be01:fe:f00::/56"
|
|
|
|
# ];
|
|
|
|
# endpoint = "[2a0f:be01::1]:51822";
|
|
|
|
# # persistentKeepalive = 15;
|
|
|
|
# }
|
2024-06-09 21:04:13 +02:00
|
|
|
];
|
|
|
|
};
|
2024-06-09 20:48:07 +02:00
|
|
|
};
|
|
|
|
}
|