Grub install hook:
[Trigger]
Operation = Install
Operation = Upgrade
Type = File
Target = usr/lib/grub/*/*.mod
[Action]
Description = Installing GRUB with grub-install
Depends = grub
When = PostTransaction
Exec = /usr/bin/grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS
Grub mkconfig hook:
[Trigger]
Operation = Install
Operation = Remove
Type = File
Target = usr/lib/modules/*/vmlinuz
[Action]
Description = Updating GRUB-configuration after changes to kernels installed…
Depends = grub
When = PostTransaction
Exec = /usr/bin/grub-mkconfig -o /boot/grub/grub.cfg