From 906baa8fee6bc33d9fb5fe20b99a3ebca2d8dbe8 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sun, 14 Dec 2025 15:19:35 -0500 Subject: [PATCH] Rework migration --- migrations/1758455816.sh | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/migrations/1758455816.sh b/migrations/1758455816.sh index 6a5aec2c..e9114e1b 100644 --- a/migrations/1758455816.sh +++ b/migrations/1758455816.sh @@ -1,24 +1,11 @@ -echo "Adding thunderbolt module to mkinitcpio" +echo "Add thunderbolt support to boot image" -OMARCHY_HOOKS="/etc/mkinitcpio.conf.d/omarchy_hooks.conf" -RUN_MKINITCPIO=false +omarchy-pkg-add bolt -if ! grep -q '^MODULES=' $OMARCHY_HOOKS; then - # Add a new MODULES line with thunderbolt - sudo sed -i '1iMODULES=(thunderbolt)' $OMARCHY_HOOKS - RUN_MKINITCPIO=true -elif grep -q '^MODULES=' $OMARCHY_HOOKS && ! grep -qE "^MODULES=.*(\bthunderbolt\b)" $OMARCHY_HOOKS; then - # Add thunderbolt inside the existing MODULES=(...) list (before the closing paren) - sudo sed -i -E "s/^(MODULES=\([^)]*)\)/\1 thunderbolt)/" $OMARCHY_HOOKS - RUN_MKINITCPIO=true +if [[ ! -f /etc/mkinitcpio.conf.d/thunderbolt_module.conf ]]; then + sudo tee /etc/mkinitcpio.conf.d/thunderbolt_module.conf </dev/null +MODULES+=(thunderbolt) +EOF fi -if [ "$RUN_MKINITCPIO" = true ]; then - echo "Regenerating initramfs with thunderbolt module included" - # From omarchy-refresh-plymouth - if command -v limine-mkinitcpio &>/dev/null; then - sudo limine-mkinitcpio - else - sudo mkinitcpio -P - fi -fi \ No newline at end of file +sudo limine-update