That said, I’m not an expert and would love to know the best path toward using it on Nix. Is the answer ultimately a flake with options for its configuration? Presently, only Void Linux and Debian users are using this.
Oh yeah, you’re totally right. It’s probably a tool used by non-systemd platforms. It’s a real shame since the bpool with special grub compatibility is not ideal and will become even worse when zpool create <full disk> gets a flag to create an EFI partition as well, since the optimizations will not be available to anyone using boot environments.
Well dracut is just a tool for creating initrd. It doesn’t care if your OS uses systemd or not, and even has available hooks to use systemd in initrd.
I tried to get dracut working for nixos before, and honestly it’s just a pain because of all the FHS hard coded paths, plus it’s a horrible amalgamation of bash bits that’s just really annoying to work with.
Currently on my other distros I’m using zrepl for create snapshots locally. But I believe that this isn’t very useful on nixos, since it create grub entries for the various generations. I’m wrong? otherwise I can use zrepl for only home dataset. But now I’m studying your configuration
I am not sure what your exact use cases are and possibly it’s better to create a separate thread when you want to dig more into that for zrepl (as this was for zfsbootmenu).
I personally don’t take snapshots of / but use a tmpfs (or reset to a blank / on boot) similar to this setup
On some hosts I also just create snapshots for later recovery (when I do operations I regret later) and don’t sync them somewhere.
What make sense for your personal setup and what does not make sense is possibly something that just you can say .
About the nixos generation sentence: it I personally would not say that a nixos generation is equivalent to a zfs snapshot, as the generation just covers what you declare in your config, there are also some other stuff that you might want to safe for later (ofc depending on your config), it could begin with more obvious things like /home and maybe /var/lib (there is some state dir in like for databases) but also some other things where you have impure processes that can’t be recovered from the nixos config.