niksos/hosts/niks/wireguard/default.nix

31 lines
876 B
Nix

{
config,
pkgs,
...
}: {
networking = {
firewall = {
allowedUDPPorts = [ 51820 ];
checkReversePath = "loose";
};
wireguard = {
dynamicEndpointRefreshSeconds = 5;
interfaces = {
ch0 = {
ips = [ "10.100.0.2/24" ];
listenPort = 51820;
privateKeyFile = "/home/jacek/.wg/chmura";
peers = [
{
publicKey = "cq4ZqnPM7wVGkoiquDbQLNuqEiPuHa/CLiGFow6buUI=";
allowedIPs = [ "0.0.0.0/0" ];
endpoint = "hcq082e0b05.sn.mynetname.net:51820";
persistentKeepalive = 25;
}
];
};
};
};
};
}