4 ms·
Novice here. Can someone explain to me why I'd use this over say docker, ansible, or even a make file? BTW I'm no expert in any of the aforementioned, I've ha
by account-5 5y ago
Novice here.
Can someone explain to me why I'd use this over say docker, ansible, or even a make file?
BTW I'm no expert in any of the aforementioned, I've had to use docker, was thinking of learning about make files, and wanted to look at ansible, maybe.
- alduin32 5y agoNix allows to have a "declarative" approach to configuration management, whereas Ansible uses a more "imperative" approach. For example, applying a Nix configuration is more-or-less guaranteed to be an idempotent operation, while this is not guaranteed at all using Ansible : many Ansible modules are not idempotent at all. This brings many useful features, for example the ability to rollback to a previous state, or more generally the ability to have some determinism in configuration management of complex systems. Nix and Docker can be combined together, I have many hosts where some services run in Docker containers, where the Dockerfile is defined in the Nix configuration itself, or generated by composing the upstream Dockerfile with my own configuration values.
- rgoulter 5y agoLoosely, I'd compare it to using Emacs or Vim instead of VSCode. You'll have a steeper learning curve, but it has power-user benefits.
- ParetoOptimal 5y ago> Can someone explain to me why I'd use this over say docker, ansible, or even a make file? Better reproducability by default. Docker containers usually have drift from `apt update` and that can let the "works on my machine creep in". You can avoid this in your own Docker containers, but you can't fix the whole ecosystem using that approach. The nix ecosystem avoids this drift and other sources of repriducability issues like the plague. If he is very popular Technologies with very common workflows, Nix might not seem worth it since the sharp edges from the lack of reproducibility have been filed down by brute force. You might find as soon as you need to do something slightly different, or need to get around a bug right now, you'll want Nix.