diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-08-15 04:04:28 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-08-15 04:06:01 +0200 |
commit | e620be97fe212b43ee42865dd4d3c8bba7f26fa9 (patch) | |
tree | 8264ab1b127ef3d25f6a24b64da271e99973562e /nixos/modules/virtualisation/containers.nix | |
parent | e6c00e60c3eb6ba390e2081818d7ac30c916d3e0 (diff) | |
download | nixpkgs-e620be97fe212b43ee42865dd4d3c8bba7f26fa9.tar nixpkgs-e620be97fe212b43ee42865dd4d3c8bba7f26fa9.tar.gz nixpkgs-e620be97fe212b43ee42865dd4d3c8bba7f26fa9.tar.bz2 nixpkgs-e620be97fe212b43ee42865dd4d3c8bba7f26fa9.tar.lz nixpkgs-e620be97fe212b43ee42865dd4d3c8bba7f26fa9.tar.xz nixpkgs-e620be97fe212b43ee42865dd4d3c8bba7f26fa9.tar.zst nixpkgs-e620be97fe212b43ee42865dd4d3c8bba7f26fa9.zip |
Containers: Set up /etc/resolv.conf
Systemd-nspawn is supposed to do this, but doesn't if any of the --network-* flags are used.
Diffstat (limited to 'nixos/modules/virtualisation/containers.nix')
-rw-r--r-- | nixos/modules/virtualisation/containers.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index d0d04d9a1e5..7f545a9d303 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -187,6 +187,8 @@ in "/nix/var/nix/profiles/per-container/$INSTANCE" \ "/nix/var/nix/gcroots/per-container/$INSTANCE" + cp -f /etc/resolv.conf "$root/etc/resolv.conf" + if [ "$PRIVATE_NETWORK" = 1 ]; then extraFlags+=" --network-veth" fi |