41997d49da
Trigger re-installation of grub files when the store path of the grub package changes. This is consistent with how side-effects are executed in other parts of NixOS, e.g. systemd service management, and ensures that the actually running grub stays in sync with the grub package in the Nix store that is part of the system closure. In particular, this causes security patches or dependency changes to be taken into effect without the need to bump the package version. Impact: This change causes a re-installation of grub for all systems, due to the lack of a persisted grub store path in existing state files. Background: So far we only re-installed grub outside of the store when its its version, the package name, or some flags changed. This leads to the various security patches only fixing new installations of grub and not existing ones. This has been like this for over a decade, but it remains unclear why the implementation decision had been to be overly cautious with modifying boot loader side effects. Fixes #486315 PL-135147