diff --git a/machines/modules/malobeo/wireguard.nix b/machines/modules/malobeo/wireguard.nix index fcb040a..9d606c6 100644 --- a/machines/modules/malobeo/wireguard.nix +++ b/machines/modules/malobeo/wireguard.nix @@ -72,7 +72,7 @@ in mtu = 1340; #seems to be necessary to proxypass nginx traffic through vpn address = [ "${myPeer.address}/24" ]; autostart = cfg.autostart; - dns = [peers.ns1.address]; + dns = [peers.ns1.address "1.1.1.1"]; listenPort = mkIf (myPeer.role == "server") myPeer.listenPort; # This allows the wireguard server to route your traffic to the internet and hence be like a VPN diff --git a/machines/ns1/configuration.nix b/machines/ns1/configuration.nix index 7721eea..1b397b9 100644 --- a/machines/ns1/configuration.nix +++ b/machines/ns1/configuration.nix @@ -17,6 +17,7 @@ in ../modules/sshd.nix ../modules/minimal_tools.nix ../modules/autoupdate.nix + inputs.self.nixosModules.malobeo.vpn ]; networking.firewall = { @@ -25,6 +26,14 @@ in allowedUDPPorts = [ 53 ]; }; + sops.defaultSopsFile = ./secrets.yaml; + sops.secrets.wg_private = {}; + services.malobeo.vpn = { + enable = true; + name = "ns1"; + privateKeyFile = config.sops.secrets.wg_private.path; + }; + services.bind = { enable = true; forwarders = [