23 lines
586 B
Nix
23 lines
586 B
Nix
{ config, ... }:
|
|
{
|
|
networking = {
|
|
firewall.allowedUDPPorts = [ 51820 ];
|
|
|
|
wireguard.interfaces = {
|
|
"${config.ips.wgInt}" = {
|
|
# Define IP of client in per device config
|
|
listenPort = 51820;
|
|
privateKey = config.secrets.wgClientPriv;
|
|
peers = [
|
|
{ # NixOS Server
|
|
publicKey = "qnOT/lXOJMaQgDUdXpyfGZB2IEyUouRje2m/bCe9ux8=";
|
|
allowedIPs = [ "${config.ips.wgSpan}.0/24" ];
|
|
endpoint = "sv.${config.domains.jim1}:51820";
|
|
persistentKeepalive = 25;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|