2024-02-04 00:11:26 +00:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
networking.useDHCP = false;
|
|
|
|
networking.bridges = {
|
|
|
|
"br0" = {
|
|
|
|
interfaces = [
|
|
|
|
"eno2"
|
|
|
|
"enp23s0"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.interfaces.br0.ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = "192.168.0.42";
|
|
|
|
prefixLength = 22;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
networking.defaultGateway = "192.168.0.1";
|
|
|
|
networking.nameservers = [ "192.168.0.1" ];
|
2024-02-04 18:34:52 +00:00
|
|
|
|
|
|
|
networking.nat = {
|
|
|
|
enable = true;
|
|
|
|
internalInterfaces = ["ve-+"];
|
|
|
|
externalInterface = "wg0";
|
|
|
|
enableIPv6 = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.wireguard.interfaces = {
|
|
|
|
wg0 = {
|
|
|
|
ips = [ "10.175.197.82/32" "fd7d:76ee:e68f:a993:f6b2:9dab:ddd3:a02/128" ];
|
|
|
|
privateKeyFile = "/run/secrets/services/wireguard/airvpn.private";
|
|
|
|
|
|
|
|
peers = [
|
|
|
|
{
|
|
|
|
publicKey = "PyLCXAQT8KkM4T+dUsOQfn+Ub3pGxfGlxkIApuig+hk=";
|
|
|
|
presharedKeyFile = "/run/secrets/services/wireguard/airvpn.psk";
|
|
|
|
allowedIPs = [ "10.128.0.1" ];
|
|
|
|
endpoint = "134.19.179.213:1637";
|
|
|
|
persistentKeepalive = 25;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-02-04 00:11:26 +00:00
|
|
|
}
|