From e8539b6f608ae24a7dd537b6261c5f69f41ed877 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 Mar 2012 14:46:47 +0000 Subject: [PATCH] * Generate a resolvconf.conf file for openresolv. svn path=/nixos/trunk/; revision=32718 --- modules/config/networking.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/config/networking.nix b/modules/config/networking.nix index 562d5144531..18e0b834c98 100644 --- a/modules/config/networking.nix +++ b/modules/config/networking.nix @@ -56,5 +56,20 @@ in ''; target = "hosts"; } + + { # /etc/resolvconf.conf: Configuration for openresolv. + source = pkgs.writeText "resolvconf.conf" + '' + # This is the default, but we must set it here to prevent + # a collision with an apparently unrelated environment + # variable with the same name exported by dhcpcd. + interface_order='lo lo[0-9]*' + + # Invalidate the nscd cache whenever resolv.conf is + # regenerated. + libc_restart='${pkgs.upstart}/sbin/start invalidate-nscd' + ''; + target = "resolvconf.conf"; + } ]; }