1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

network-interfaces: Add an option for specifying search to resolv.conf

This commit is contained in:
William A. Kennington III 2014-04-24 17:46:12 -05:00
parent 1ac4383889
commit 84a94ff006

View file

@ -183,6 +183,15 @@ in
'';
};
networking.search = mkOption {
default = [];
example = [ "example.com" "local.domain" ];
type = types.listOf types.str;
description = ''
The list of search paths used when resolving domain names.
'';
};
networking.domain = mkOption {
default = "";
example = "home";
@ -424,6 +433,7 @@ in
${optionalString (cfg.nameservers != [] && cfg.domain != "") ''
domain ${cfg.domain}
''}
${optionalString (cfg.search != []) ("search " + concatStringsSep " " cfg.search)}
${flip concatMapStrings cfg.nameservers (ns: ''
nameserver ${ns}
'')}