mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
network-interfaces: Add an option for specifying search to resolv.conf
This commit is contained in:
parent
1ac4383889
commit
84a94ff006
|
@ -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}
|
||||
'')}
|
||||
|
|
Loading…
Reference in a new issue