2022-05-08 22:44:10 +02:00
|
|
|
{ config, pkgs, ... }:
|
2022-04-25 15:26:18 +02:00
|
|
|
|
|
|
|
{
|
2022-04-25 16:16:57 +02:00
|
|
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
|
|
|
|
2022-04-25 15:26:18 +02:00
|
|
|
networking.wg-quick.interfaces.wg-dvb = {
|
2022-04-28 14:43:40 +02:00
|
|
|
address = [ "10.13.37.${toString (config.dvb-dump.systemNumber + 100)}/32" ];
|
2022-04-25 15:26:18 +02:00
|
|
|
privateKeyFile = "/root/wg-seckey";
|
2022-05-08 22:44:10 +02:00
|
|
|
postUp = ''
|
|
|
|
${pkgs.iputils}/bin/ping -c 10 10.13.37.1 || true
|
|
|
|
'';
|
2022-04-25 15:26:18 +02:00
|
|
|
|
|
|
|
peers = [{
|
|
|
|
publicKey = "WDvCObJ0WgCCZ0ORV2q4sdXblBd8pOPZBmeWr97yphY=";
|
2022-04-25 16:16:57 +02:00
|
|
|
allowedIPs = [ "10.13.37.0/24" ];
|
2022-04-25 15:26:18 +02:00
|
|
|
endpoint = "academicstrokes.com:51820";
|
|
|
|
persistentKeepalive = 25;
|
2022-04-30 23:41:24 +02:00
|
|
|
}];
|
2022-04-25 15:26:18 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|