summary refs log tree commit diff
diff options
context:
space:
mode:
-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 9cc8b154324f..991f9f261450 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}
                 '')}