In /etc/fstab/
include a x-systemd.requires=unlock-bcachefs-vault.service
mount option. This service does the unlocking before the mount is triggered. Example line as in my /etc/fstab
:
UUID=bf512699-6643-4d96-a793-daaf3f1d34f1 /mnt/vault bcachefs nofail,x-systemd.requires=unlock-bcachefs-vault.service 0 0
The content of the unlock service: