From 07531e369139e7cd679b5affba7029b123c9ba8e Mon Sep 17 00:00:00 2001 From: ShatteredMINT Date: Wed, 13 May 2026 11:11:43 +0200 Subject: [PATCH] change wireguard config to include DNS --- devices/conv.nix | 2 +- software/wireguard-client.nix | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/devices/conv.nix b/devices/conv.nix index 091b9b1..2c03da4 100644 --- a/devices/conv.nix +++ b/devices/conv.nix @@ -64,7 +64,7 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # make custom dns work while gracefully falling back on public servers - networking.networkmanager.insertNameservers = [ "192.168.178.108" ]; + # networking.networkmanager.insertNameservers = [ "192.168.178.108" ]; # networking.interfaces.enp4s0f3u1u4u1.useDHCP = lib.mkDefault true; # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; diff --git a/software/wireguard-client.nix b/software/wireguard-client.nix index 312e642..8b5f951 100644 --- a/software/wireguard-client.nix +++ b/software/wireguard-client.nix @@ -5,16 +5,17 @@ {ip}: { networking = { firewall.allowedUDPPorts = [56878]; - wireguard = { - enable = true; + wg-quick = { + # enable = true; interfaces.wg0 = { - ips = [ ("192.168.87." + builtins.toString(ip) + "/32")]; + adress = [ ("192.168.87." + builtins.toString(ip) + "/32")]; listenPort = 56878; privateKeyFile = "/root/wg.keys"; + dns = [ "192.168.178.108" ]; peers = [ { - name = "hub"; + # name = "hub"; publicKey = "XEaJXQW+7llbreoK161NkMhFxlctL1UK8nFiY/GtuC0="; allowedIPs = [ "192.168.178.0/24" "192.168.87.127/32" "192.168.87.128/25"]; endpoint = "173.249.36.74:56878";