Nix introduction, main concepts and commands

Adaltas
Adaltas
Published in
7 min readFeb 1, 2022

--

Nix is a functional package manager for Linux and other Unix systems, making the management of packages more reliable and easy to reproduce.

With a traditional package manager, when updating a package, a new version is downloaded and used to overwrite its associated files. Changes can’t be undone. If for a reason, one or more files are not correctly updated during the upgrade, those files of the package are going to be corrupted. This could make the entire package not functional. In addition, if different packages require different versions of the same package as a dependency, at least one is going to be broken.

This article presents what Nix package manager is, the various deployment options and how to start with it.

What is Nix

Nix is a functional package manager. Below are the three main benefits of using Nix compared with a traditional package manager:

  • Nix brings reliability: installing or upgrading one package don’t break other packages. It ensures that no package is inconsistent during an upgrade. Roll back to previous versions is possible.
  • Nix brings reproducibility: packages are built by Nix in isolation from each other. This ensures that they are reproducible and don’t have undeclared dependencies, so if a package works on…

--

--

Adaltas
Adaltas

Open Source consulting - Big Data, Data Science, Node.js