Sync after installing the boot loader

Previously we synced just before calling switch-to-configuration.
That prevents corruption of the Nix store, but it can leave the boot
loader configuration and kernel files in /boot corrupted.  So do the
sync after installing the boot loader.