~ruther/nixos-config

772db87a99d03db2cce20757499748ae6da991c8 — Rutherther 1 year, 6 months ago d866dc2
feat: add dns servers through wireguard
1 files changed, 10 insertions(+), 1 deletions(-)

M modules/services/wireguard.nix
M modules/services/wireguard.nix => modules/services/wireguard.nix +10 -1
@@ 5,9 5,18 @@
    allowedUDPPorts = [ 51820 ];
  };

  networking.nameservers = [
    "${inputs.semi-secrets.wg.lan.serverIp}"
    "1.1.1.1"
    "1.0.0.1"
  ];

  networking.resolvconf.extraOptions = [
    "timeout: 2"
  ];

  networking.wireguard.interfaces = {
    wg0 = {
      ips = [ "192.168.32.50/32" ];
      listenPort = 51820;

      generatePrivateKeyFile = true;

Do not follow this link