NixOS is not just a distro — it’s a manifesto.
For decades, administering a Unix or Linux system has meant progressively building its state. We install packages, edit configuration files, enable services, and perform upgrades.
Every operation leaves its mark. Over time, the operating system becomes, in part, a product of its own history.
Is this the only way to think about an operating system?
The Roots of Declarative Thinking
Declarative thinking predates Unix itself.
In 1958, John McCarthy presented “Programs with Common Sense” (published in 1959), an early exploration of how computers could reason from logical statements and derive conclusions from them. It anticipated a central idea of declarative programming: describing what we want rather than specifying every step required to achieve it.
Within the Unix tradition itself, we find a familiar example: make, developed by Stuart Feldman at Bell Labs in the 1970s and described in his 1979 paper.
With make, we declare targets and their dependencies. The tool determines which operations are necessary to achieve the desired result, even though its recipes still rely on imperative commands.
Declarative thinking is not foreign to the Unix world.
It is part of its history.
The Path Taken by Linux Distributions
With the rise of Linux distributions in the 1990s, a predominantly imperative model of administration became the norm, built around incremental changes to mutable systems.
Despite differences in package management and init systems, the underlying workflow remained largely the same: modifying an existing state through successive operations. Individual configuration files might be declarative, yet the system as a whole remained dependent on its history.
Two initially identical machines can gradually diverge over time, a phenomenon known as configuration drift.
This is a consequence of the administration model itself.
The Declarative Shift
In 2008, Eelco Dolstra and Andres Löh presented “NixOS: A Purely Functional Linux Distribution”.
Building upon the Nix package manager, their proposal extended the principles of purely functional programming to the configuration of an entire operating system.
Instead of modifying system components in place, we describe the desired configuration and build the system from that specification. System generations reference immutable components, allowing previous configurations to be restored.
Reproducibility, dependency isolation, and rollback are central to how the system is constructed and managed.
Mutable state still exists, but the system’s definition becomes more clearly separated from its persistent data.
A Reinterpretation of the Unix Philosophy
After more than two decades of using Slackware, I found in NixOS a radically different approach to system administration. Yet many of the ideas that drew me to Unix remain familiar.
Unix taught us how to compose tools.
NixOS teaches us how to compose systems.
The Nix language and its unconventional filesystem layout introduce real complexity. However, a steeper learning curve does not necessarily translate into greater operational complexity. The initial effort of learning a declarative model can simplify the long-term administration and maintenance of a system.
Its emphasis on composability, explicit dependencies, and predictable behavior offers a different perspective on the Unix philosophy. Simplicity can also come from making complexity explicit and manageable.
Perhaps the deepest shift is not between NixOS and Unix, but between the administrator and the machine: moving from managing what a system has been to defining what it should be.
That is why I see NixOS not merely as a Linux distribution, but as a manifesto.
References
- John McCarthy. Programs with Common Sense. Presented in 1958, published in 1959.
- Stuart I. Feldman. Make — A Program for Maintaining Computer Programs. Software: Practice and Experience, 1979.
- Eelco Dolstra and Andres Löh. NixOS: A Purely Functional Linux Distribution. ICFP, 2008.