What is the best practice to customize initrd?

There is an initrd called initrd-org.clearlinux.native.<version> containing some kernel modules. However it seems that there is no way to customize which files should be included in it.

It is possible to build another cpio as initrd, and modify kernel cmdline to load it. However I need to do it again after kernel upgrading.

What is the best practice to customize that initrd file ?

dracut is the tool for building your own initrd. It should work, but, it’s been a while since I’ve tested it.

What modules do you need/want? Perhaps you have a more common use case that we should just fix for everyone.

I am working on decrypting luks root partition with a gpg smartcard,
which is done by adding a long random key to the partition, encrypt that key, and decrypt it with smartcard on boot.
A demo of this routine can also be found here https://source.puri.sm/pureos/packages/smartcard-key-luks.