Copy resolv.conf on first start

This commit is contained in:
Jip-Hop 2024-06-24 15:40:45 +02:00
parent dd30ffe255
commit 2841137177
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,6 @@ seccomp=1
# Ensure to change br1 to the interface name you want to use
# You may want to add additional options here, e.g. bind mounts
systemd_nspawn_user_args=--network-bridge=br1
--resolv-conf=bind-host
--bind-ro=./lxd.nix:/etc/nixos/lxd.nix
# Script to run on the HOST before starting the jail
@ -22,6 +21,7 @@ pre_start_hook=#!/usr/bin/env bash
echo 'BEFORE_FIRST_BOOT'
# Create empty nix module to satisfy import in default lxc configuration.nix
echo '{ ... }:{}' > ./lxd.nix
cp /etc/resolv.conf ./rootfs/etc/resolv.conf
fi
# Only used while creating the jail