feat: allow users to use custom main Arch repo

This commit is contained in:
Rudra Saraswat 2024-06-09 11:57:09 +00:00
parent 97224821ef
commit 0fa9484c8f

View file

@ -230,6 +230,9 @@ def update_system():
pacman_mirrorlist_conf.write('nameserver 1.1.1.1\n') pacman_mirrorlist_conf.write('nameserver 1.1.1.1\n')
with open('/.new_rootfs/etc/pacman.d/mirrorlist', 'w') as pacman_mirrorlist_conf: with open('/.new_rootfs/etc/pacman.d/mirrorlist', 'w') as pacman_mirrorlist_conf:
if type(blend_release.get('arch-repo')) == str:
pacman_mirrorlist_conf.write(f'Server = {blend_release.get("arch-repo")}/$repo/os/$arch\n')
else:
pacman_mirrorlist_conf.write('Server = https://cloudflaremirrors.com/archlinux/$repo/os/$arch\n') pacman_mirrorlist_conf.write('Server = https://cloudflaremirrors.com/archlinux/$repo/os/$arch\n')
exec_chroot('mkdir', '-p', '/var/cache/pacman/pkg') exec_chroot('mkdir', '-p', '/var/cache/pacman/pkg')