From cfc7821a40e3693d48fa741074d304cf50ba1f19 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Tue, 16 Jul 2024 18:37:05 +0200 Subject: [PATCH] feat: adds wireguard connection for `violet` with keys in root --- modules/core/wireguard.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 modules/core/wireguard.nix diff --git a/modules/core/wireguard.nix b/modules/core/wireguard.nix new file mode 100644 index 0000000..7ca3965 --- /dev/null +++ b/modules/core/wireguard.nix @@ -0,0 +1,18 @@ +{ ... }: +{ + networking.wg-quick.interfaces = { + wg0 = { + address = [ "10.7.0.2/24" "fddd:2c4:2c4:2c4::2/64" ]; + dns = [ "9.9.9.9" "149.112.112.112" ]; + privateKeyFile = "/root/wireguard-keys/privatekey"; + + peers = [{ + publicKey = "GfrFhe2JV8FS/711WAdx6CLF/QIEj1KoOGP/ErxBHkg="; + presharedKeyFile = "/root/wireguard-keys/preshared_from_peer0_key"; + allowedIPs = [ "0.0.0.0/0" "::/0" ]; + endpoint = "57.129.46.171:51820"; + persistentKeepalive = 25; + }]; + }; + }; +}