Streamline GRUB installation

This commit is contained in:
Manuel Thalmann 2024-07-16 22:18:39 +02:00
parent 6283ed0803
commit e4dfb6ae10
3 changed files with 37 additions and 1 deletions

View file

@ -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" \

View file

@ -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

View file

@ -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