diff --git a/configuration.nix b/configuration.nix index e87acb0..c12c58e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -180,20 +180,9 @@ dns = [ "10.0.1.65" ]; privateKeyFile = "/etc/wireguard/private.key"; - preUp = '' - ENDPOINT_IP=$(${pkgs.dig}/bin/dig +short vpn.leeworks.dev @1.1.1.1 | head -1) - GATEWAY=$(${pkgs.iproute2}/bin/ip route show default | ${pkgs.gawk}/bin/awk '{print $3}') - DEV=$(${pkgs.iproute2}/bin/ip route show default | ${pkgs.gawk}/bin/awk '{print $5}') - ${pkgs.iproute2}/bin/ip route add "$ENDPOINT_IP" via "$GATEWAY" dev "$DEV" - ''; - postDown = '' - ENDPOINT_IP=$(${pkgs.dig}/bin/dig +short vpn.leeworks.dev @1.1.1.1 | head -1) - ${pkgs.iproute2}/bin/ip route del "$ENDPOINT_IP" || true - ''; - peers = [{ publicKey = "VEpzr/CeGdS6Wsy0NDDfmlB/bCYxS55A155HWGCIIzc="; - endpoint = "vpn.leeworks.dev:51820"; + endpoint = "69.48.243.22:51820"; allowedIPs = [ "0.0.0.0/0" ]; persistentKeepalive = 25; }];