mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Merge branch 'dev' into mkinitcpio_module_thunderbolt
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
if command -v limine &>/dev/null; then
|
||||
sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook
|
||||
|
||||
sudo tee /etc/mkinitcpio.conf.d/omarchy_hooks.conf <<EOF >/dev/null
|
||||
MODULES=(thunderbolt)
|
||||
HOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs)
|
||||
@@ -35,6 +37,7 @@ KERNEL_CMDLINE[default]="$CMDLINE"
|
||||
KERNEL_CMDLINE[default]+="quiet splash"
|
||||
|
||||
ENABLE_UKI=yes
|
||||
CUSTOM_UKI_NAME="omarchy"
|
||||
|
||||
ENABLE_LIMINE_FALLBACK=yes
|
||||
|
||||
@@ -73,10 +76,14 @@ term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5
|
||||
term_foreground: c0caf5
|
||||
term_foreground_bright: c0caf5
|
||||
term_background_bright: 24283b
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook
|
||||
# Remove the original config file if it's not /boot/limine.conf
|
||||
if [[ "$limine_config" != "/boot/limine.conf" ]] && [[ -f "$limine_config" ]]; then
|
||||
sudo rm "$limine_config"
|
||||
fi
|
||||
|
||||
|
||||
# Match Snapper configs if not installing from the ISO
|
||||
if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then
|
||||
@@ -97,13 +104,40 @@ EOF
|
||||
chrootable_systemctl_enable limine-snapper-sync.service
|
||||
fi
|
||||
|
||||
# Add UKI entry to UEFI machines to skip bootloader showing on normal boot
|
||||
if [[ -n $EFI ]] && efibootmgr &>/dev/null && ! efibootmgr | grep -q Omarchy &&
|
||||
! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends" &&
|
||||
! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then
|
||||
sudo efibootmgr --create \
|
||||
--disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \
|
||||
--part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \
|
||||
--label "Omarchy" \
|
||||
--loader "\\EFI\\Linux\\$(cat /etc/machine-id)_linux.efi"
|
||||
echo "Re-enabling mkinitcpio hooks..."
|
||||
|
||||
# Restore the specific mkinitcpio pacman hooks
|
||||
if [ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]; then
|
||||
sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook
|
||||
fi
|
||||
|
||||
if [ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]; then
|
||||
sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook
|
||||
fi
|
||||
|
||||
echo "mkinitcpio hooks re-enabled"
|
||||
|
||||
sudo limine-update
|
||||
|
||||
if [[ -n $EFI ]] && efibootmgr &>/dev/null; then
|
||||
# Remove the archinstall-created Limine entry
|
||||
while IFS= read -r bootnum; do
|
||||
sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1
|
||||
done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/')
|
||||
fi
|
||||
|
||||
# Move this to a utility to allow manual activation
|
||||
# if [[ -n $EFI ]] && efibootmgr &>/dev/null &&
|
||||
# ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends" &&
|
||||
# ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then
|
||||
#
|
||||
# uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1)
|
||||
#
|
||||
# if [[ -n "$uki_file" ]]; then
|
||||
# sudo efibootmgr --create \
|
||||
# --disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \
|
||||
# --part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \
|
||||
# --label "Omarchy" \
|
||||
# --loader "\\EFI\\Linux\\$uki_file"
|
||||
# fi
|
||||
# fi
|
||||
|
||||
Reference in New Issue
Block a user