2024-12-31 12:14:17 -06:00
|
|
|
{ config, machines, ... }:
|
2024-10-27 22:59:13 -05:00
|
|
|
|
|
|
|
{
|
|
|
|
networking = {
|
2024-11-09 21:35:11 -06:00
|
|
|
firewall.allowedUDPPorts = [ 50000 ];
|
2024-10-27 22:59:13 -05:00
|
|
|
|
|
|
|
wireguard.interfaces = {
|
|
|
|
wg0 = {
|
|
|
|
ips = [ "10.100.0.2/24" ];
|
2024-11-09 21:35:11 -06:00
|
|
|
listenPort = 50000;
|
2024-10-27 22:59:13 -05:00
|
|
|
|
2024-12-31 12:14:17 -06:00
|
|
|
privateKeyFile = config.age.secrets.copernicus-wg-priv.path;
|
2024-10-27 22:59:13 -05:00
|
|
|
peers = [
|
|
|
|
{ # netbox
|
2024-12-27 02:09:45 -06:00
|
|
|
publicKey = machines.netbox.wg-pubkey;
|
2024-10-27 22:59:13 -05:00
|
|
|
allowedIPs = [ "10.100.0.0/24" ]; # only stuff in the wg-subnet (10.100.0.*)
|
2024-11-09 21:35:11 -06:00
|
|
|
endpoint = "149.28.63.115:50000";
|
2024-10-27 22:59:13 -05:00
|
|
|
persistentKeepalive = 25;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|