From 270d7c2fe4b776c8bbd40dc3df19a7f456376bf3 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Fri, 28 Jun 2024 20:22:50 +0530 Subject: [PATCH] hosts/okina: add wireguard config Signed-off-by: Amneesh Singh --- hosts/okina/networking.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hosts/okina/networking.nix b/hosts/okina/networking.nix index 563d281..9a4c3ad 100644 --- a/hosts/okina/networking.nix +++ b/hosts/okina/networking.nix @@ -24,6 +24,20 @@ }; }; + wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; { + ips = [ okina ]; + listenPort = 17840; + privateKeyFile = "/var/secrets/wg.key"; + peers = [{ + #Oracle VM1 + publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM="; + allowedIPs = [ remilia ]; + endpoint = "${conf.network.addresses.domain.natto}:17840"; + persistentKeepalive = 25; + }]; + }; + + defaultGateway = "192.168.1.1"; nameservers = [ "1.1.1.1" "8.8.8.8" ]; };