Remix.run Logo
▲ pitchlatte a day ago

i’ve been reading about Nix and trying to get it for a while and reading your comment made me think about journaling file systems. would that be an appropriate comparison here? i understand that the declarative paradigm is a fundamentally different design of course.

▲cloudfudge a day ago | parent | next [-]

That would be another way to get the rollback property, but that doesn't solve for example the dependency collision problem. It also doesn't solve the problem of deleting something another package depends on, other than that you can roll it back. With nix, if the package is referenced in a closure, it simply isn't deleted. It's like magical garbage collection for every part of your system.

And it isn't just a snapshot of your machine state, it's a definition of how the machine state got that way, plus a mechanism for arbitrarily applying any such definition. You don't even have to restrict yourself to a linear roll-forward-roll-back path. You can install A, B, C, D, E and then remove C and know that you aren't breaking anything, even though you were never in that state before.

▲krautsauer a day ago | parent | prev [-]

You can e.g. use btrfs, put /usr in a subvolume, regularily snapshot it, and roll back when you don't like some modification. What you still don't get is the state in /usr being defined by some manageable amount of code, where you can easily say "rip out this part" without rolling back everything you did afterwards.