summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces.nix
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-04-24 17:46:12 -0500
committerWilliam A. Kennington III <william@wkennington.com>2014-05-02 12:42:20 -0500
commit84a94ff0064cacbfba55e5f2eb59461f68235e97 (patch)
tree23635fd78120cb4db9f372e28f58b0adf001e85d /nixos/modules/tasks/network-interfaces.nix
parent1ac43838898a3cb7889618632297772fd0c2d093 (diff)
downloadnixpkgs-84a94ff0064cacbfba55e5f2eb59461f68235e97.tar
nixpkgs-84a94ff0064cacbfba55e5f2eb59461f68235e97.tar.gz
nixpkgs-84a94ff0064cacbfba55e5f2eb59461f68235e97.tar.bz2
nixpkgs-84a94ff0064cacbfba55e5f2eb59461f68235e97.tar.lz
nixpkgs-84a94ff0064cacbfba55e5f2eb59461f68235e97.tar.xz
nixpkgs-84a94ff0064cacbfba55e5f2eb59461f68235e97.tar.zst
nixpkgs-84a94ff0064cacbfba55e5f2eb59461f68235e97.zip
network-interfaces: Add an option for specifying search to resolv.conf
Diffstat (limited to 'nixos/modules/tasks/network-interfaces.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 9cc8b154324..991f9f26145 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -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}
                 '')}