From f57f91f85839c0797d0bc87b5d4e0ed07100b596 Mon Sep 17 00:00:00 2001 From: jaina heartles Date: Mon, 25 Dec 2023 20:45:33 -0800 Subject: [PATCH] saving work --- vpn.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 vpn.nix diff --git a/vpn.nix b/vpn.nix new file mode 100644 index 0000000..774cae2 --- /dev/null +++ b/vpn.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +{ + networking.firewall.allowedUDPPorts = [ 51820 ]; + + networking.wireguard.interfaces.wg0 = { + ips = [ "10.100.0.2/24" ]; + listenPort = 51820; + + privateKeyFile = "/home/jaina/wg-keys/private"; + + peers = [ + { + publicKey = "8g2nDmUFmTE4y+0zvpB6tD5ktoULHpWQw+bud5yA6GA=" + allowedIPs = [ "192.168.1.1/16" ]; + + endpoint = ""; + } + ]; + }; +}