Hacker News new | ask | show | jobs
by Cu3PO42 1028 days ago
I was aware of the possibility of just using tmpfs, but I went with ZFS for / anyway for mostly one reason: I can erase root on every boot, but still keep snapshots of the last few boots. That means, that if I mess up some configuration and I fail to persist some important data, I can still go back and recover it if I need to.
1 comments

I'm not sure that's necessary for / at least, though /home is a different matter.

Everything that needs to be persisted for / is done so either in configuration.nix (or equivalent flake), or using Impermanence. Once you've persisted things in one of those, it will remain so for all future derivations.

You can also create separate ZFS pools for things like LXC/LXD that need to persist between boots, but don't naturally go in / or /home.

So far I haven't run into a case where I forgot to add something to my impermanence config, so you may be right: it might not be necessary. However, just knowing that I could fix it if I forget something (for example when setting up a new service) somewhere down the line just gives me peace of mind.