From 95c6cefd24ad762cc00f1b866ac6ad0d66d653a3 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Fri, 6 Feb 2026 19:22:36 -0600 Subject: [PATCH] new wireguard connections --- hosts/vps/configuration.nix | 2 ++ modules/modules.nix | 4 ++++ modules/services/wireguard.nix | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/hosts/vps/configuration.nix b/hosts/vps/configuration.nix index d5085b0..b3a3290 100644 --- a/hosts/vps/configuration.nix +++ b/hosts/vps/configuration.nix @@ -12,6 +12,7 @@ let homeServer = config.my.ips.wg-server; wgFriend1 = config.my.ips.wg-friend1; wgGuest1 = config.my.ips.wg-guest1; + wgGuest2 = config.my.ips.wg-guest2; }; subnets = { wgFriends = config.my.subnets.wg-friends; @@ -102,6 +103,7 @@ in iifname "${wgInterface}" ip saddr ${subnets.wgFriends} ip daddr ${ips.homeServer}/32 icmp type echo-request accept iifname "${wgInterface}" ip saddr ${ips.wgFriend1}/32 ip daddr ${ips.homeServer}/32 tcp dport ${portsStr.stash} accept iifname "${wgInterface}" ip saddr ${ips.wgGuest1}/32 ip daddr ${ips.homeServer}/32 tcp dport ${portsStr.stash} accept + iifname "${wgInterface}" ip saddr ${ips.wgGuest2}/32 ip daddr ${ips.homeServer}/32 tcp dport ${portsStr.stash} accept iifname "${wgInterface}" ip saddr ${subnets.wgGuests} ip daddr ${ips.homeServer}/32 icmp type echo-request accept iifname "${wgInterface}" ip saddr ${subnets.wgFriends} oifname "${externalInterface}" accept diff --git a/modules/modules.nix b/modules/modules.nix index d4ddc48..7e58bb6 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -53,11 +53,15 @@ in vps = "45.79.25.87"; wg-vps = "10.77.0.1"; wg-server = "10.77.0.2"; + wg-galaxy = "10.77.0.3"; + wg-phone = "10.77.0.4"; wg-guest1 = "10.9.0.2"; + wg-guest2 = "10.9.0.3"; wg-friend1 = "10.8.0.2"; wg-friend2 = "10.8.0.3"; wg-friend3 = "10.8.0.4"; wg-friend4 = "10.8.0.5"; + wg-friend5 = "10.8.0.6"; }; description = "Set of IP's for all my computers."; }; diff --git a/modules/services/wireguard.nix b/modules/services/wireguard.nix index 3af3905..508b8d0 100644 --- a/modules/services/wireguard.nix +++ b/modules/services/wireguard.nix @@ -43,6 +43,22 @@ in publicKey = "yg+2miZCrx89znFaUlU/le/7UIPgEAMY74fZfEwz8g4="; allowedIPs = [ "${config.my.ips.wg-friend4}/32" ]; } + { + publicKey = "u4/6ZYO7lUJZ9QmSlFPUaadq25gwDljjhsfgs/p2amc="; + allowedIPs = [ "${config.my.ips.wg-friend5}/32" ]; + } + { + publicKey = "NvhUnErIb0/hi+Hui/o5l5Pq4ZysFVIn1VBPsjoTeCk="; + allowedIPs = [ "${config.my.ips.wg-guest2}/32" ]; + } + { + publicKey = "BwN4uCkMd6eAS5Ugld0oXnA16IhgEEQF8mOJ3+vHliA="; + allowedIPs = [ "${config.my.ips.wg-galaxy}/32" ]; + } + { + publicKey = "R1xUFOuboQf/yy8ShiXqoCPaPcH3Cn0n4PAWB2rgHTs="; + allowedIPs = [ "${config.my.ips.wg-phone}/32" ]; + } ]; }; };