4 ms·
A nice upgrade to that is to put root in a tmpfs RAM filesystem instead of ZFS: https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/ https://elis.nu/blog/2020/05/
by SkyMarshal 3y ago
A nice upgrade to that is to put root in a tmpfs RAM filesystem instead of ZFS:
https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/ https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/
That way it doesn't even need to bother with resetting to ZFS snapshots, instead it just wipes root on shutdown and reconstructs it in RAM on reboot.
Then, optionally, with some extra work you can put /home in tmpfs too:
https://elis.nu/blog/2020/06/nixos-tmpfs-as-home/ https://elis.nu/blog/2020/06/nixos-tmpfs-as-home/
That setup uses Home Manager, so maybe it's not for you, but worth mentioning if we're talking about making all state declarative and reproducible. You have to use the Impermanence module and set up some soft links to permanent home folders on different drive or partition. But for making all state on the system reproducible and declarative, this is the best way afaik.
- fuzzy2 3y agoThanks, that's interesting. It allows one to stick to "regular Linux filesystems", which is probably a good thing.
- SkyMarshal 3y agoTrue, I think it's more a more elegant setup than the ZFS version. Why actively rollback to a snapshot when ephemeral memory will do that automatically on reboot. That said I'll just mention that ZFS support on NixOS is like nothing else I've seen in Linux. ZFS is like a first-class citizen on NixOS, painless to configure and usually just works like any other filesystem. https://old.reddit.com/r/NixOS/comments/ops0n0/big_shoutout_to_the_nixos_team_for_the_excellent/ https://old.reddit.com/r/NixOS/comments/ops0n0/big_shoutout_...