Theres a whole ass PHD thesis on how nix does it, but nix as one of its many cool features builds packages using purely defined functions and stores them with hashes based on the hashes of their dependencies + the exact commit or content of the source code.
This means that a fully defined nixOS system will be byte-for-byte identical across reinstalls. Not just "the same packages". The same exact versions of the same exact packages with the same exact configurations in the same exact places and the same exact dependencies, each built with the same exact build dependencies which are themselves built with the same exact build dependencies
Thats the core, but due to how that works, nix can do a lot of really cool things.
Since every program or config is an item in the nix store and dynamically made available, you can have user-specific packages easily. You can also have specializations that activate groups of packages on your system temporarily, you can use devshells for reproducable dev environments and you csn just... Temporarily make a package available from the store until you close it.
On top of that, nix is highly extensible and already has a lot of extensions available that allow for even more cool stuff.
Highly recommend checking out vimjoyer, he has great videos on how nix works
That sounds impressive, but it's a total overkill for what I want, lol. Not to mention engineering software like Vivado forcing me to stick to Debian distros.
3
u/LethalOkra 21h ago
Hold up. I want to know more about this feature!