Today marks the day where I’m throwing disko-zfs into the open. The synopsis is that it allows you to manage ZFS datasets declaratively, either directly using a JSON schema, or if you’re using NixOS using Nix.
You simply need to give disko-zfs a schema and it will ensure that your ZFS pool matches. disko-zfs will synthesize a list of commands to execute, which if executed will make everything match up. However it will never actually execute any dataset destructive commands, the only things it will do are creating new datasets and setting/unsetting properties.
Numtide has been using this tool internally for a month now and so far it works great. But, always make sure it will do what you think it will do before applying the new configuration, oh and backups, don’t forget backups. You have been warned!
The development of disko-zfs has been done under contract from Numtide so a big shout out to Numtide! For more details see the accompanying blog post and the repository itself.