Experimental package management with Nix and NixOS

Brand New Package

© Photo by Jess Bailey on Unsplash

© Photo by Jess Bailey on Unsplash

Article from Issue 248/2021
Author(s):

NixOS and the Nix package manager offer a promising new approach to the challenge of managing packages in Linux.

In most Linux distributions, the files associated with the OS end up in specific places. Most Linux distributions subscribe to the filesystem hierarchy defined in the Linux Standards Base (LSB), which specifies the familiar directory names you are accustomed to if you work in Linux (/etc, /dev, /bin, etc.). On most Linux systems, if you do not have the files in the right places, the applications will not find them. But experimentation is at the heart of Linux, and every rule has an exception. An innovative project called NixOS [1] takes a different approach to system configuration and package management.

On NixOS, all files are in the Nix store. For applications to find them, NixOS links to the correct locations with symlinks. This approach makes all kinds of things possible. For instance, you can have several versions of any library and let the application know which link to use. For development environments, you can even test an application using system files from different distributions, just using the package manager.

On a NixOS system, everything is reproducible. A good backup of your home directory and a few *.nix files is all you need to get back up after a crash.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • NixOS 22.5 Is Now Available

    The latest release of NixOS with a much-improved package manager and a user-friendly graphical installer.

  • NixOS 21.11 Now Available for Download

    NixOS “Porcupine” has been made available for installation and includes numerous improvements.

  • NixOS

    The innovative NixOS makes it easy to test and deploy new configurations – on the hardware and in the cloud

  • NixOS 24.05 Is Ready for Prime Time

    The latest release of NixOS (Uakari) has arrived and offers its usual reproducible, declarative, and reliable goodness.

  • Next Gen Distributions

    With systemd poised to revolutionize the init process, we look at Linux distributions that have left the familiar path, use new approaches and techniques, and are paving the way for the next generation of Linux distros.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News