diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 0021c9301e..e30d86b053 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -754,6 +754,13 @@ def post_install_enable_iwd_service(*args: str, **kwargs: str) -> None: for psk in psk_files: shutil.copy2(psk, f'{self.target}/var/lib/iwd/{os.path.basename(psk)}') + # Enable systemd-resolved by (forcefully) setting a symlink + # For further details see https://wiki.archlinux.org/title/Systemd-resolved#DNS + resolv_config_path = Path(f'{self.target}/etc/resolv.conf') + if resolv_config_path.exists(): + os.unlink(resolv_config_path) + os.symlink('/run/systemd/resolve/stub-resolv.conf', resolv_config_path) + # Copy (if any) systemd-networkd config files if netconfigurations := glob.glob('/etc/systemd/network/*'): if not os.path.isdir(f'{self.target}/etc/systemd/network/'):