summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-18 16:40:27 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-18 16:48:11 +0200
commit21573af9fb0b53806703c44b46d813b0c5d6efa5 (patch)
treef45c95aa793604f3eb0c11010b52f5d65d348723 /nixos/modules/tasks/network-interfaces.nix
parent5c62d3d26b07bb78ec92aec69e99dbee542f5e9d (diff)
downloadnixpkgs-21573af9fb0b53806703c44b46d813b0c5d6efa5.tar
nixpkgs-21573af9fb0b53806703c44b46d813b0c5d6efa5.tar.gz
nixpkgs-21573af9fb0b53806703c44b46d813b0c5d6efa5.tar.bz2
nixpkgs-21573af9fb0b53806703c44b46d813b0c5d6efa5.tar.lz
nixpkgs-21573af9fb0b53806703c44b46d813b0c5d6efa5.tar.xz
nixpkgs-21573af9fb0b53806703c44b46d813b0c5d6efa5.tar.zst
nixpkgs-21573af9fb0b53806703c44b46d813b0c5d6efa5.zip
Containers: Use /etc/resolv.conf supplied by the host
This used to work with systemd-nspawn 203, because it bind-mounted
/etc/resolv.conf (so openresolv couldn't overwrite it). Now it's just
copied, so we need some special handling.
Diffstat (limited to 'nixos/modules/tasks/network-interfaces.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index a33b571d437..9cc8b154324 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -191,6 +191,15 @@ in
       '';
     };
 
+    networking.useHostResolvConf = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        In containers, whether to use the
+        <filename>resolv.conf</filename> supplied by the host.
+      '';
+    };
+
     networking.localCommands = mkOption {
       default = "";
       example = "text=anything; echo You can put $text here.";