aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2025-09-20 17:39:59 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2025-09-20 17:39:59 -0400
commite1c83d85676f96db3a74b51e760e8d190ef87efb (patch)
tree56f2e0c0beb93fb225179439ad43a72e6a3acc3a
parent19b9df780c8660285168279506a06ac06bb6f407 (diff)
downloadvoussoir-e1c83d85676f96db3a74b51e760e8d190ef87efb.tar.gz
voussoir-e1c83d85676f96db3a74b51e760e8d190ef87efb.tar.xz
Setup limine, snap-pac and such
-rw-r--r--installer/run.sh42
1 files changed, 35 insertions, 7 deletions
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 <<EOF
timeout: 5
@@ -421,6 +427,7 @@ timeout: 5
path: boot():/vmlinuz-linux
cmdline: cryptdevice=UUID=${_part2_uuid}:${_cryptname} root=/dev/mapper/${_cryptname} rootflags=subvol=@,compress=zstd rw
module_path: boot():/initramfs-linux.img
+
EOF
set +x
@@ -482,12 +489,16 @@ cd "$yaydir"
yay --version >/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