IIUC correctly support for this will be removed with scripted initrd in 26.11.
Wondering if anyone is in a similar position and what they ended up doing and why.
I think I have the option of using piv (which will work both with my yubikey 4 and 5) or FIDO2 which is only supported by the yubikey v5. At first glance FIDO2 seems easier to configure except for having to enroll each yubikey.
The supported options are those described in systemd-cryptenroll(1). Anything else is just out of scope and not reasonably maintainable in-tree in nixpkgs. cryptsetup does have a concept of plugins, and I think it would be a good idea for us to add more generic support for those, but AFAIK there aren’t plugins for the deprecated methods other than the fido2 / tpm2 / pkcs11 ones you get with systemd-cryptenroll.
If you want support for additional key acquisition methods, my recommendation is to file issues upstream with systemd about the method you’d like, or to create an out-of-tree cryptsetup plugin for it. In the latter case, NixOS still needs to implement a generic interface for integrating arbitrary cryptsetup plugins, but that would be a welcome change (unlike any specific in-tree implementations of key acquisition methods).