summary refs log tree commit diff
path: root/nixos/modules/config/networking.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@higgsboson.tk>2016-10-03 09:17:43 +0200
committerJörg Thalheim <joerg@higgsboson.tk>2016-10-03 14:37:29 +0200
commit4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69 (patch)
tree709a15141c5d10a32551e17b57f191f7e4fc095f /nixos/modules/config/networking.nix
parent1c1143288495b33ab9a35ef58708417b6d401450 (diff)
downloadnixlib-4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69.tar
nixlib-4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69.tar.gz
nixlib-4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69.tar.bz2
nixlib-4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69.tar.lz
nixlib-4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69.tar.xz
nixlib-4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69.tar.zst
nixlib-4792af66c3a70ae4b21e45a7fbd2cf6462cd6a69.zip
networking: enable "multi on" in resolver settings
this allows to return ipv4/ipv6 addresses for the same host in /etc/hosts.
fixes #19148
Diffstat (limited to 'nixos/modules/config/networking.nix')
-rw-r--r--nixos/modules/config/networking.nix16
1 files changed, 16 insertions, 0 deletions
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 <filename>/etc/host.conf</filename>. See also <citerefentry><refentrytitle>host.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+      '';
+    };
+
     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 =
             ''