From 4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Mon, 3 Oct 2016 09:17:43 +0200 Subject: networking: enable "multi on" in resolver settings this allows to return ipv4/ipv6 addresses for the same host in /etc/hosts. fixes #19148 --- nixos/modules/config/networking.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'nixos/modules') diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index 952f62569c93..fdc782b0579e 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -29,6 +29,19 @@ in ''; }; + networking.hostConf = lib.mkOption { + type = types.lines; + default = "multi on"; + example = '' + multi on + reorder on + trim lan + ''; + description = '' + The contents of /etc/host.conf. See also host.conf5. + ''; + }; + networking.dnsSingleRequest = lib.mkOption { type = types.bool; default = false; @@ -171,6 +184,9 @@ in ${cfg.extraHosts} ''; + # /etc/host.conf: resolver configuration file + "host.conf".text = cfg.hostConf; + # /etc/resolvconf.conf: Configuration for openresolv. "resolvconf.conf".text = '' -- cgit 1.4.1