Syncing time and date in initrd (wireguard)

Hello everyone, I want to be able to ssh unlock via wireguard on a raspberry pi. Connectivity via wireguard looks fine, but on startup, the time and date are way off so no wireguard connection. I could write a script in a systemd service that syncs the time on initrd “boot”, but I was wondering if there’s a NixOS way to do this. Thanks!

If you’re using systemd initrd, it would probably be pretty easy to pull in systemd-timesyncd.service.