3 ms·
The Nix package manager is to apt what Emacs/Vim are to Notepad. Nix is a very powerful tool for dealing with packages. NixOS uses the package manager to manag
by rgoulter 3y ago
The Nix package manager is to apt what Emacs/Vim are to Notepad.
Nix is a very powerful tool for dealing with packages. NixOS uses the package manager to manage the system configuration.
With a declarative config, you mitigate the risk of "I made this change, forgot what that change was" (or otherwise systems becoming out of sync with each other). Ansible also solves this, sure. (Though, NixOS forces a system into a target state).
Especially useful for working on more than one machine is the ability to conveniently install the same sets of packages everywhere. -- The standard thing to do is just run "install <package>" on each machine. Whereas with Nix, you can write a meta-package of packages you want, and either install this system-wide, or just have those packages added to PATH for when you need them.
With Nix, you pay an upfront cost, so that later you don't have to pay the cost later. -- It's a similar trade-off to using Ansible, or using a dotfile manager across machines.
Nix's reproducibility has benefits, too; before using Nix, when picking up a side project would often require that I'd update the code, as system package managers updated their package versions. -- With Nix, it's easy to retain references to old versions, and possible to have both old and latest versions of a package available on the same system.