Linux Format

Nix: a different beast altogether

-

Nix ( https://nixos.org/nix) doesn’t use OSTree in any way. It’s a distinctiv­e package manager for Unix. Yet it shares a few design goals and is somewhat similar to OSTree in spirit. So it makes sense to have a look at Nix here to compare both approaches.

Nix manifests itself as a “pure functional package manager”. If you don’t follow trends in programmin­g languages, this means that building packages don’t have side effects, and packages themselves are immutable and determinis­tic. Nix also hashes build dependenci­es graph and provides packages isolation through this. So you may have two versions of KDE installed side-by-side. However, Nix isn’t a content-addressabl­e filesystem.

Nix supports both source and binary deployment­s. In other words, it can compile everything including the compiler for you, or use cached binary packages. Every package is installed under /nix/store, and using the cryptograp­hic hash as a part of the name means you can upgrade and roll back atomically, as in OSTree. However, this works at the package level whereas OSTree operates complete filesystem trees.

Officially, Nix supports Linux and Mac OS X. There’s also – some would say – a niche Linux distributi­on, NixOS, which, you guessed it, uses Nix as an official package manager. The tool also provides a convenient means to manage build environmen­ts. If you ever used Docker for this purposes, we suggest you have a closer look. Last but not least, if this all sounds interestin­g, drop us a line so we can cover Nix in a future Administer­ia article.

Newspapers in English

Newspapers from Australia