2022-06-12 16:39:15 +01:00
|
|
|
{config, ...}: {
|
2022-01-14 15:38:01 +01:00
|
|
|
networking.wireguard = {
|
|
|
|
enable = true;
|
|
|
|
interfaces."wg0" = {
|
|
|
|
listenPort = 51820;
|
|
|
|
privateKeyFile = "/run/secrets/network/wireguard/privkey";
|
2022-01-14 15:47:37 +01:00
|
|
|
peers = [
|
2022-04-07 14:30:09 +01:00
|
|
|
# nixos-8gb-fsn1-1
|
2022-01-18 13:54:53 +01:00
|
|
|
{
|
|
|
|
publicKey = "zQY9cAzbRO/FgV92pda7yk0NJFSXzHfi6+tgRq3g/SY=";
|
2022-01-18 13:57:22 +01:00
|
|
|
allowedIPs = [
|
2022-12-14 10:40:28 +01:00
|
|
|
"fd0d:a262:1fa6:e621:b4e1:08ff:e658:6f49/128"
|
2023-01-09 19:04:59 +01:00
|
|
|
"fd0d:a262:1fa6:e621:b4e1:08ff:e658:6f49/64"
|
2022-01-18 13:54:53 +01:00
|
|
|
];
|
|
|
|
endpoint = "138.201.155.128:51820";
|
2022-01-19 20:26:26 +01:00
|
|
|
persistentKeepalive = 25;
|
2022-01-18 13:54:53 +01:00
|
|
|
}
|
2022-12-14 10:40:28 +01:00
|
|
|
{
|
|
|
|
publicKey = "GHsVg8seCVIMYOidH5+/3EnoXRmi98NXtNTVu+nFcnw=";
|
|
|
|
allowedIPs = [
|
|
|
|
"fd0d:a262:1fa6:e621:746d:4523:5c04:1453/128"
|
|
|
|
];
|
|
|
|
endpoint = "130.162.60.127:51820";
|
|
|
|
persistentKeepalive = 25;
|
|
|
|
}
|
2022-01-14 15:47:37 +01:00
|
|
|
];
|
2022-01-14 15:38:01 +01:00
|
|
|
};
|
|
|
|
};
|
2022-06-12 16:39:15 +01:00
|
|
|
networking.firewall.allowedUDPPorts = [51820];
|
|
|
|
sops.secrets."network/wireguard/privkey" = {};
|
2022-01-14 15:38:01 +01:00
|
|
|
}
|