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