ip declarations
This commit is contained in:
@@ -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 = "";
|
||||
|
||||
Reference in New Issue
Block a user