i dont think theyre equivalent tools since Terraform is used for things like creating cloud VMs with the selected OS image, configuring subnets and route tables among other things which i dont believe NixOS is meant for
ive not done secrets management before but i came across this list on hackernews, a few non-cloud ones use open source license https://news.ycombinator.com/item?id=37133054#37151218
but another user there have mentioned that while most of them integrate with Kubernetes and AWS, short lived DB credentials are not in any of those listed
but quantum resistant encryption are important even now despite that because of store now, decrypt later of long-term sensitive information