diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-08-17 20:48:18 -0500 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-08-17 20:48:18 -0500 |
| commit | 2b1c6161c5d2381cbfe224694dfb218aee0b6da1 (patch) | |
| tree | e51c7bd694d5ad27fb9e68e51f11aae4e8c57fcc /hosts/mercury/wireguard.nix | |
| parent | e29dd8a2283399b7e046937340509d5aec4b52ba (diff) | |
something is seriously broken rn
Diffstat (limited to 'hosts/mercury/wireguard.nix')
| -rw-r--r-- | hosts/mercury/wireguard.nix | 18 |
1 files changed, 16 insertions, 2 deletions
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"; } ]; }; |
