diff --git a/scripts/Arch/OS/setup.fish b/scripts/Arch/OS/setup.fish index 5547857c..5f5f47c5 100644 --- a/scripts/Arch/OS/setup.fish +++ b/scripts/Arch/OS/setup.fish @@ -80,7 +80,7 @@ begin and runHook installDrivers "Installing drivers..." || true and runInOS fish "$tempDir/../../Common/Software/nix/main.fish" configure user and arch-chroot "$mountDir" bash "$tempDir/../Software/sudo/install.sh" - and arch-chroot "$mountDir" bash "$tempDir/../Software/GRUB/install.sh" + and runInOS fish "$tempDir/../Software/GRUB/main.fish" and USER_NAME="$USER_NAME" \ USER_DISPLAYNAME="$USER_DISPLAYNAME" \ diff --git a/scripts/Arch/Software/GRUB/main.fish b/scripts/Arch/Software/GRUB/main.fish new file mode 100644 index 00000000..a3c4cdee --- /dev/null +++ b/scripts/Arch/Software/GRUB/main.fish @@ -0,0 +1,17 @@ +#!/bin/env fish +begin + set -l dir (status dirname) + source "$dir/../../Scripts/software.fish" + source "$dir/../../../Common/Software/GRUB/main.fish" + + function installSW -V dir + pacinst \ + grub \ + efibootmgr \ + os-prober + + configureSW + end + + runInstaller $argv +end diff --git a/scripts/Common/Software/GRUB/main.fish b/scripts/Common/Software/GRUB/main.fish new file mode 100644 index 00000000..225f44e1 --- /dev/null +++ b/scripts/Common/Software/GRUB/main.fish @@ -0,0 +1,19 @@ +#!/bin/env fish +begin + set -l dir (status dirname) + source "$dir/../../Scripts/config.fish" + source "$dir/../../Scripts/software.fish" + + function configureSW + set -l efiDir (getConfig valhalla.boot.efiMountPoint) + + sudo sed -i \ + -e "s/#\(GRUB_DISABLE_OS_PROBER\)/\1/" \ + /etc/default/grub + + sudo grub-install --target=x86_64-efi --efi-directory="$efiDir" --bootloader-id="$(getConfig valhalla.boot.label)" + grub-mkconfig -o "$efiDir/grub/grub.cfg" + end + + runInstaller $argv +end