From d8008d3befb867ebedf05a3cb9a4c1deb5243504 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Mon, 3 Sep 2018 15:43:01 +0200 Subject: [PATCH] petalius: wg: setup dns --- petalius.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/petalius.nix b/petalius.nix index 24bf024..7670286 100644 --- a/petalius.nix +++ b/petalius.nix @@ -93,6 +93,12 @@ ips = ["10.59.0.2/16"]; privateKeyFile = "/etc/wgkeys/petalius"; allowedIPsAsRoutes = true; + postSetup = '' + printf "nameserver 10.57.0.1" | ${pkgs.openresolv}/bin/resolvconf -a wg0 -m 0 + ''; + postShutdown = '' + ${pkgs.openresolv}/bin/resolvconf -d wg0 + ''; peers = [{ publicKey = "ByLlJbevlTBooAo2RIZGGJvBHKqA9qiOpHBvR5yuJX4="; allowedIPs = ["10.56.0.0/14" "10.60.1.1"];