ip declarations

This commit is contained in:
Danilo Reyes
2026-02-05 17:02:20 -06:00
parent c09268891e
commit afbffaa203
3 changed files with 75 additions and 74 deletions

View File

@@ -5,7 +5,6 @@
}:
let
port = 51820;
interface = config.my.interfaces.${config.networking.hostName};
in
{
options.my.services.wireguard.enable = lib.mkEnableOption "WireGuard VPN configuration";
@@ -13,16 +12,11 @@ in
sops.secrets."vps/server/private".sopsFile = ../../secrets/wireguard.yaml;
networking = {
firewall.allowedUDPPorts = [ port ];
nat = {
enable = true;
externalInterface = interface;
internalInterfaces = [ "wg0" ];
};
wireguard.interfaces.wg0 = {
ips = [
"${config.my.ips.wg-vps}/24"
"10.8.0.1/24"
"10.9.0.1/24"
"${config.my.ips.wg-friend0}/24"
"${config.my.ips.wg-g0}/24"
];
listenPort = port;
postSetup = "";