2024-10-27 22:59:13 -05:00
|
|
|
{ lib, config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
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
|
|
|
|
|
|
|
privateKeyFile = "/home/usr/wg-keys/private";
|
|
|
|
peers = [
|
|
|
|
{ # netbox
|
|
|
|
publicKey = "0fOqAfsYO4HvshMPnlkKL7Z1RChq98hjDr0Q8o7OJFE=";
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|