From e5e147b0676451a357b4fb8ce650673d5483742a Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Thu, 18 Sep 2025 08:58:48 +0200 Subject: [PATCH] backup wg conn that only tunnels traffic to home --- modules/services/wireguard-client.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/services/wireguard-client.nix b/modules/services/wireguard-client.nix index 67660ab..5cc9a9a 100644 --- a/modules/services/wireguard-client.nix +++ b/modules/services/wireguard-client.nix @@ -26,5 +26,22 @@ } ]; }; + wg1 = { + # General Settings + autostart = false; + privateKeyFile = config.age.secrets.wireguard-client.path; + listenPort = 51820; + dns = [ "192.168.2.1" ]; + address = [ "192.168.2.22/24" ]; + peers = [ + { + allowedIPs = [ "192.168.2.0/24" "192.168.0.0/24" ]; + #allowedIPs = [ "0.0.0.0/0" ]; + endpoint = "kopatz.dev:51820"; + publicKey = "vyHNUy97R1cvqEvElznPpFQtoqm7WUHnT96UP6Dquwc="; + persistentKeepalive = 30; + } + ]; + }; }; }