Same, using NixOS as a NAS, though it kept growing and now I'm trying to share it with other people. I use BTRFS on MDADM though. It's ended up being an all-in-one home server and router now because I was tired of the noisy power hungry rack I had in my closet.
This is what I'm hoping to do. I haven't done much research yet, so I look forward to reading about your learnings. (Also to the person who responded to you with their experience and link.)
Thanks for saving me probably some hours...
EDIT: I'm also coming from an old Synology NAS from the ~2015 era.
https://HomeFree.host