NixOS and the case for declarative configuration

All at Once

© Lead Image © Sergey Lavrentev,

© Lead Image © Sergey Lavrentev,

Article from Issue 163/2014

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

Linux distribution updates always come with a certain risk. Will all the configured services still work after the upgrade? Or, has a daemon once again changed the format of its configuration files so that the program fails to launch? Most Linux distributions are at least smart enough to avoid overwriting user-modified config files, but a defined upgrade path, which ensures the operation of the upgraded system, usually is not available.

The Nix project [1] takes an alternative approach. A Nix system is fundamentally different from normal Linux distributions. The system state is set declaratively, instead of imperatively. In other words, the complete system is defined all at once, rather than configured through a series of independent steps that each change the system state.

Nix consists of a special package manager, a package collection, a Linux distribution, and some other specialized tools. The instructions of the Nix package manager obey functional principles: an input state is entered in the function (the package manager), and the output is a new system state. Side effects are not allowed.


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

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • 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.

  • Bcfg2

    The powerful Bcfg2 provides a sophisticated environment for centralized configuration management.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95