From e1c83d85676f96db3a74b51e760e8d190ef87efb Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sat, 20 Sep 2025 17:39:59 -0400 Subject: Setup limine, snap-pac and such --- installer/run.sh | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'installer/run.sh') diff --git a/installer/run.sh b/installer/run.sh index 93b8ef7..a6353ec 100644 --- a/installer/run.sh +++ b/installer/run.sh @@ -171,7 +171,12 @@ esac } do_chroot() { - arch-chroot "$_install_path" "$@" + if [ "$1" = "-u" ] ; then + _u="$2"; shift; shift + arch-chroot -u "$_u" "$_install_path" "$@" + else + arch-chroot "$_install_path" "$@" + fi } set -x @@ -413,6 +418,7 @@ efibootmgr --create --disk "$_disk" --part 1 --label "Arch Linux Limine Bootload --loader "\EFI\limine\limine.efi" \ --unicode +# This one is just for first boot... cat > "$_install_path"/boot/limine.conf </dev/null 2>&1 || makepkg -si cd - -yay -Sy brave-bin -' > "${_install_path}"/home/"${_username}"/install_aur_and_brave.sh +yay -S brave-bin snapper limine-snapper-sync limine-mkinitcpio-hook snap-pac + +# snapper -c root create-config / +sudo systemctl enable limine-snapper-sync.service +' > "${_install_path}"/home/"${_username}"/setup.sh -do_chroot chown "$_username" /home/"${_username}"/install_aur_and_brave.sh -do_chroot chmod +x /home/"${_username}"/install_aur_and_brave.sh +do_chroot chown "$_username" /home/"${_username}"/setup.sh +do_chroot chmod +x /home/"${_username}"/setup.sh +do_chroot pacman -Syy if [ "$GRAPHICS" = yes ] ; then case $(lspci | grep VGA) in @@ -517,8 +528,8 @@ Session=xfce" > "$_install_path"/etc/sddm.conf.d/autologin.conf echo 'Defaults!/usr/bin/visudo env_keep += "SUDO_EDITOR EDITOR VISUAL" Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/bin" root ALL=(ALL:ALL) ALL -# %wheel ALL=(ALL:ALL) NOPASSWD: ALL -%wheel ALL=(ALL:ALL) ALL +%wheel ALL=(ALL:ALL) NOPASSWD: ALL +# %wheel ALL=(ALL:ALL) ALL @includedir /etc/sudoers.d' > "${_install_path}"/etc/sudoers @@ -545,8 +556,25 @@ ln -sf \ "${_install_path}"/etc/systemd/system/bluetooth.target.wants/bluetooth.service +do_chroot -u "$_username" /bin/sh -c "export HOME=/home/'$_username'; /home/'$_username'/setup.sh" + fi # CONFIGURE +do_chroot cp /boot/limine.conf.old /boot/limine.conf + +echo '#!/bin/sh +set -ex +if [ "$(id -u)" -ne 0 ] ; then + echo "Run this script as root, i.e. with sudo" + exit 1 +fi +cp /boot/limine.conf /boot/limine.conf.install +snapper -c root create-config / +limine-update +limine-snapper-sync + +' > "${_install_path}"/home/"${_username}"/setup.sh + echo "${_green}Install complete! Rebooting!" sleep 10 reboot -- cgit v1.2.3