4 ms·
Can someone explain what is NixOS designed for? (ELI5 please)
by mirap 8y ago
Can someone explain what is NixOS designed for? (ELI5 please)
- k__ 8y agoReproducible OS setups. Like Docker, but it uses install scripts instead of layered images.
- agumonkey 8y agoand an actual solid language instead of a sequence of whatever
- aidenn0 8y agoAnd it does a lot more work to prevent you from shooting yourself in the foot. Docker scripts that e.g. clone a remote and build from the HEAD are not reproducible. Another example would be downloading fancysoftware-latest.tgz Nixos will have you either pull from a specific git commit, or will hash the sources, so the default behavior is reproducible.
- nextos 8y agoReproducibility. In a nutshell, it's a purely functional Linux distribution. That means all changes you make to your system are non-destructive. For example, you can always roll back to a previous OS state, which is represented by a hash computed from all packages installed, and all options you've set. In turn, package hashes are computed from the package sources and all inputs (buildtime and runtime package dependencies).
- deleted 8y ago[deleted]
- adamtulinius 8y agoWe migrated from Debian+Ansible to NixOS to easier be able to ensure consistency across servers. Rolling back and forth is really easy for most things. It's also the most convenient system I ever worked with for creating custom packages, which is lucky, because NixOS does have fewer pages compared to other distributions.
- buovjaga 8y ago> NixOS does have fewer packages compared to other distributions It's not bad, though: https://repology.org/repository/nix_stable https://repology.org/repository/nix_stable Haskell and R packages will be added soon to give a more complete picture.
- adamtulinius 8y agoYou're right, it's not bad, but chances are one will need to do a bit of packaging work if using NixOS for many different or complicated things. But as I said, it's all in all really nice to work with Nix.
- hollerith 8y ago>It's also the most convenient system I ever worked with for creating custom packages Is Arch Build System one of the systems you've ever worked with? (I found ABS very convenient.)
- paride5745 8y agoYou really do not want to use Arch for production, enterprise systems.
- hollerith 8y agoOK, but I still want an answer to my question -- to help me decide what distro to choose for personal use. (I already get that the design of NixOS prevents the system's ending up in an incoherent state, which will happen on Arch eventually if you wait long enough between upgrades.)
- corysama 8y agoBesides reproducibility, I like it as a nooby Linux user because I can add and remove packages willy nilly with complete confidence that my machine is in a clean, reliable, understandable state. I can even set up conflicting package arrangements and flip between them with a single, fast command.
- pxc 8y agoYep! I think this point is sometimes underemphasized as NixOS has some rough edges and its users tend to get carried away and geek out about how it works. But it's a great platform for fearless experimentation, because it's so easy to revert any change you later decide was undesired.
- rakoo 8y agoImagine any single change in your system configuration (packages, configuration, startup scripts, whatever) is loaded into a source version control as you move forward. If something fails, you can always rollback to a previous revision, and since everything is there, you know your whole system will be working. If you want to reproduce your system, you can copy the whole content and "checkout" the relevant revision on the new system. Because the hash is the same, every single bit underneath will be the same.
- mightybyte 8y agoNixOS is a Linux distro built around the Nix package system. Nix is built around the idea of immutability. It makes all packages immutable by giving them their own directory identified by a hash that is derived from ALL of that package's dependencies. This has a number of desirable properties: * It makes it trivial to have multiple versions of the same package installed at the same time and allows you to switch between them at will. * It is trivial to roll back your system after a failed upgrade. Difficult system recovers after you upgrade to a new unstable version are a thing of the past. * Non-privileged users can install software completely securely. * Projects packaged with nix have the best possible build reproducibility because nix accounts for ALL of your dependencies all the way down to the lowest level system libraries, compilers, etc.