Setting up snapraid-btrfs on nixos


I’m getting started with nixos and so far loving it, tutorials have been the best way for me to move things along.

My objective is to setup a NAS with home assistant and jellyfin on the side.

For data I’m using 4 drives:

  • 1 1TB drive
  • 1 2TB drive
  • 2 4TB drive
    All spinning disks

For the RAID configuration, it seems like the best option for my case (because of how uneven my drives are and how I plan to expand (one drive at a time)) is snapraid.

It looks like snapraid can be “easily” accessible as it’s already packaged for nixos, however, I know snapraid comes with it’s one risk: data changing between syncs.

After reading some more I found out about snapraid-btrfs, but I haven’t found much about it running on nixos (apart from this post talking about it a bit).

With all that said, does anyone here have any pointers on where to start with this ordeal? Any tutorials, config examples or blogposts are welcome.

BTW I’m running nixos 23.11 with home-manager.


1 Like

Hey @ory_the_human,

the author of the post you linked has his config on github, dotfiles/nixos at d2f77892d237dff90bbbf458bb3f255b982013d9 · kasuboski/dotfiles · GitHub :

Hi @damianfral,

Yes, I’ve been using that config as a reference now, I just had to learn about nixos/flakes first and things seem to be moving along now, I hope to get that over the line this weekend.

Thank you.

Heyo @ory_the_human! will you dare to share any of your findings? I’m finding myself in a very similar position. Still quite the nixos n00b running away from truenas scale / ZFS to setup something more fitting for heterogeneous spinners. thx!