Strange issue with autoUpgrade

I’ve recently enabled autoUpgrade on my servers pointed to a flake.
For most systems this worked perfectly but for my mail server it doesn’t really work, I’m getting the following error.
When build and push the config like I normally do it works perfectly fine which leaves me a bit lost why it fails.
The config for the autoUpgrade and the system is here: nixos/default.nix at 29c65f35ae21d77218ff34826e6cebc20381701e - nixos - Gitea: Git with a cup of tea

Feb 21 07:02:03 mail systemd[1]: nixos-upgrade.service: Consumed 15.131s CPU time, received 12.8K IP traffic, sent 4.2K IP traffic.
Feb 21 19:27:12 mail systemd[1]: Starting NixOS Upgrade...
Feb 21 19:27:22 mail nixos-upgrade-start[26874]: [24B blob data]
Feb 21 19:27:22 mail nixos-upgrade-start[26872]: building the system configuration...
Feb 21 19:27:29 mail nixos-upgrade-start[26902]: [14B blob data]
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:        … while calling the 'head' builtin
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:          at /nix/store/pfi7ix6c1vma70s9bbz94rj0555z5lwk-source/lib/attrsets.nix:922:11:
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:           921|         || pred here (elemAt values 1) (head values) then
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:           922|           head values
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:              |           ^
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:           923|         else
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:        … while evaluating the attribute 'value'
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:          at /nix/store/pfi7ix6c1vma70s9bbz94rj0555z5lwk-source/lib/modules.nix:807:9:
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:           806|     in warnDeprecation opt //
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:           807|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:              |         ^
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:           808|         inherit (res.defsFinal') highestPrio;
Feb 21 19:27:29 mail nixos-upgrade-start[26902]:        (stack trace truncated; use '--show-trace' to show the full trace)

I tested it again a few weeks later after a nix flake update and it works now.
I don’t really see what changed that might be related but I leave it hear for history.

[agenix] chowning...
bind: 9.18.19 → 9.18.24
extra: ε → ∅, -31007.1 KiB
firmware: +16.5 KiB
git-minimal: ∅ → 2.42.0, +47153.0 KiB
initrd-kmod-blacklist: ε → ∅
initrd-linux: 6.1.78 → 6.1.79, +23.6 KiB
keymap: ε → ∅
libusb: +76.5 KiB
linux: 6.1.78, 6.1.78-modules → 6.1.79, 6.1.79-modules, -41.2 KiB
linux-firmware: 20231111 → 20240220, +17471.3 KiB
nixos-system-mail: 23.11.20240217.84d981b → 23.11.20240225.5bf1cad
source: +52.2 KiB
stage: 1-init.sh → ∅, -30.1 KiB
systemd-minimal-libs: +188.2 KiB
udev: -30.4 KiB
unit-nixos-upgrade.service: ∅ → ε
unit-nixos-upgrade.timer: ∅ → ε
unit-script-nixos-upgrade: ∅ → ε
usbutils: ∅ → 017, +331.9 KiB
setting up /etc...
reloading user units for andreas...
setting up tmpfiles
reloading the following units: dbus.service