From 16e556f11384b71e7af2c434dbde8ba60047e38b Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sun, 7 Sep 2025 18:40:14 -0600 Subject: [PATCH] wireguard vps --- hosts/server/configuration.nix | 15 ++++++++++++++- hosts/server/toggles.nix | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 54e125e..7e9b956 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -1,4 +1,4 @@ -{ ... }: +{ config, ... }: { imports = [ ./hardware-configuration.nix @@ -6,6 +6,7 @@ ../../config/stylix.nix ]; my = import ./toggles.nix; + sops.secrets."vps/home/private".sopsFile = ../../secrets/wireguard.yaml; networking = let ports = [ @@ -20,6 +21,18 @@ allowedTCPPorts = ports; allowedUDPPorts = ports; }; + wireguard.interfaces.wg0 = { + ips = [ "10.77.0.2/32" ]; + privateKeyFile = config.sops.secrets."vps/home/private".path; + peers = [ + { + publicKey = "dFbiSekBwnZomarcS31o5+w6imHjMPNCipkfc2fZ3GY="; + endpoint = "51.222.141.104:51820"; + allowedIPs = [ "10.77.0.1/32" ]; + persistentKeepalive = 25; + } + ]; + }; }; nix = let diff --git a/hosts/server/toggles.nix b/hosts/server/toggles.nix index 0676688..e745dc0 100644 --- a/hosts/server/toggles.nix +++ b/hosts/server/toggles.nix @@ -26,7 +26,7 @@ in services = enableList mkEnabled [ "network" "nvidia" - "wireguard" + # "wireguard" ]; dev = enableList mkEnabled [ "nix"