From f765d05ebf6fa4e45d2445f5dd57b39bc63ac43f Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 12 Mar 2021 21:08:05 +0100 Subject: [PATCH] lib/lxc-container: build a static /etc/resolv.conf instead of using resolvconf --- lib/lxc-container.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lxc-container.nix b/lib/lxc-container.nix index 7d287c5e..037257ff 100644 --- a/lib/lxc-container.nix +++ b/lib/lxc-container.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, modulesPath, ... }: +{ config, pkgs, lib, modulesPath, ... }: { imports = [ @@ -8,6 +8,9 @@ networking.networkmanager.dns = "unbound"; networking.useHostResolvConf = false; + environment.etc."resolv.conf".text = '' + nameserver ${builtins.concatStringsSep " " config.networking.nameservers} + ''; nix.useSandbox = false; nix.maxJobs = lib.mkDefault 1;