Hacker News new | past | comments | ask | show | jobs | submit login

It’s really not that bad. However, with a standard NixOS setup, you still have a tremendous amount of non-reproducible state, both inside user accounts and in the system. I’m running a “Erase your darlings” setup, it mostly gets rid of non-reproducible state outside my user account. It’s a bit of a pain, but then what isn’t on NixOS.

https://grahamc.com/blog/erase-your-darlings/

Inside my user account, I don’t bother. I don’t like Home Manager.




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/

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/

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.


Thanks, that's interesting. It allows one to stick to "regular Linux filesystems", which is probably a good thing.


True, 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_...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: