diff --git a/scripts/0-install.sh b/scripts/0-install.sh index ba681ef..7107d7c 100644 --- a/scripts/0-install.sh +++ b/scripts/0-install.sh @@ -49,7 +49,7 @@ esac # Generate a fstab file genfstab -U /mnt >> /mnt/etc/fstab # Copy system config files into the new install -cp files/sys-pacman.conf /mnt/etc/pacman.conf.tmp +#cp files/sys-pacman.conf /mnt/etc/pacman.conf.tmp #cp files/sys-locale.gen /mnt/etc/locale.gen cp files/sys-environment /mnt/etc/environment cp files/sys-grub /mnt/etc/default/grub @@ -61,7 +61,7 @@ mkdir /mnt/buildscripts /mnt/userfiles cp scripts/* /mnt/buildscripts cp files/user-* /mnt/userfiles # Chroot into the new system, do some setup based on earlier questions and run the next script -arch-chroot /mnt /bin/bash < /etc/locale.conf echo "KEYMAP=uk" > /etc/vconsole.conf echo archlinux > /etc/hostname -sh /buildscripts/1-root-config.sh \ No newline at end of file +# Add "chaotic-aur" as a Pacman repository +pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com +pacman-key --lsign-key 3056513887B78AEB +pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' +pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' +# Amend pacman.conf +sed -i 's/^#Color/Color\nILoveCandy/' /etc/pacman.conf +sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf +sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf +echo "[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf +# Run full pacman sync to enable extra repos +pacman -Syu +# Enable NetworkManager +systemctl enable NetworkManager +# Install GRUB (this will need to be run again as the standard user in order to detect Windows) +echo "Installing bootloader" +grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB +grub-mkconfig -o /boot/grub/grub.cfg +# Create the standard user and add it to all neccesary groups +useradd -mG power,storage,wheel $username +echo "$username:$password" | chpasswd +# Set up sudo +sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers +# Disable the root account +passwd --lock root +# Required to enable network changes +sysctl --system +# Prompt the user to reboot +echo "Install complete, please reboot" +#sh /buildscripts/1-root-config.sh \ No newline at end of file