From 2b1c6161c5d2381cbfe224694dfb218aee0b6da1 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Mon, 17 Aug 2026 20:48:18 -0500 Subject: something is seriously broken rn --- hosts/mercury/wireguard.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'hosts/mercury/wireguard.nix') diff --git a/hosts/mercury/wireguard.nix b/hosts/mercury/wireguard.nix index 627e649..105d10b 100644 --- a/hosts/mercury/wireguard.nix +++ b/hosts/mercury/wireguard.nix @@ -2,15 +2,29 @@ config, hosts, pkgs, + lib, ... }: { environment.systemPackages = [pkgs.wireguard-tools]; + systemd.services.udp2raw-client = { + description = "udp2raw WireGuard transport"; + wantedBy = ["multi-user.target"]; + after = ["network-online.target"]; + wants = ["network-online.target"]; + + serviceConfig = { + ExecStart = "${lib.getExe pkgs.udp2raw} -c -l 127.0.0.1:51820 -r 70.130.121.193:51843 -k shared-secret -a"; + Restart = "on-failure"; + RestartSec = "2s"; + }; + }; + systemd.network.netdevs."10-wg" = { netdevConfig = { Kind = "wireguard"; Name = "wg0"; - MTUBytes = "1300"; + MTUBytes = 1200; }; wireguardConfig = { PrivateKeyFile = config.collinux.secrets."wireguard-privkey".path; @@ -20,7 +34,7 @@ { PublicKey = hosts.ganymede.wg_pubkey; AllowedIPs = ["10.100.0.0/24"]; - Endpoint = "williamsfam.us.com:51820"; + Endpoint = "127.0.0.1:51820"; } ]; }; -- cgit v1.3.1