NixOS-Config/modules/system/devices/networking/wireguard/pc/default.nix

19 lines
502 B
Nix
Raw Normal View History

{ config, ... }:
2024-10-09 03:36:08 -04:00
{
networking.wireguard.interfaces = {
"${config.ips.wgInt}" = {
# Define IP of client in per device config
listenPort = 51820;
privateKey = config.secrets.wgClientPriv;
peers = [
{ # 0.0.0.0 makes wg act like a traditional VPN
publicKey = config.secrets.wgServerPub;
allowedIPs = [ "0.0.0.0/0" ];
endpoint = "sv.${config.secrets.jimDomain}:51820";
persistentKeepalive = 25;
}
];
};
};
}