LUKS devices not found after upgrading from 21.11 to 22.11

I tried upgrading a machine from 21.11 to 22.11, but now it doesn’t boot anymore.
It says “waiting 10 seconds for device /dev/disk/by-uuid/xxx-cc5 to appear”. And then it fails to find it for some reason. This is the relevant part of my setup:

  boot.initrd.luks.devices."storage".device = "/dev/disk/by-uuid/xxx-cc5";
  boot.initrd.luks.devices.system = {
    device = "/dev/disk/by-uuid/xxx-457";
    preLVM = true;
    allowDiscards = true;
  boot.kernelParams = [ "ip=${serverAddress}::${phy-iface}:off:" ]; = {
    enable = true;
    ssh = {
      enable = true;
      port = 22;
      hostKeys = ["/root/ssh_ecdsa_key"];
      authorizedKeys = config.users.users.tyrion.openssh.authorizedKeys.keys;
    postCommands = ''
      ip a
      echo 'cryptsetup-askpass' >> /root/.profile

Everything works if I boot using the previous generation, so it’s not a problem with the device itself.
I can also remove the stuff under postCommands, nothing really changes.

An other thing which I have noticed, is that nixos-generate-config --show-hardware-config does not show my luks devices anymore. So, maybe the two things could be related?

Anyway, I have no idea how to debug this, and any help or suggestions would be appreciated.