Skip to content

Commit

Permalink
networking: enable "multi on" in resolver settings
Browse files Browse the repository at this point in the history
this allows to return ipv4/ipv6 addresses for the same host in /etc/hosts.
fixes NixOS#19148
  • Loading branch information
Mic92 committed Oct 3, 2016
1 parent 1c11432 commit 4792af6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions nixos/modules/config/networking.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 =
''
Expand Down

0 comments on commit 4792af6

Please sign in to comment.