NixOS 101 Course / Section 1: Getting started: install NixOS and live with it
Premium

1.2 How NixOS is different: one configuration instead of steps

Lesson 2 of 28 · 17:02

placeholder thumbnail

Create a free account to watch this lesson

Free account · no credit card needed

Video chapters

  1. 0:00 NixOS Origins and Reproducible Builds
  2. 2:04 How NixOS Assembles a Bootable System
  3. 5:14 Congruent vs. Convergent System Administration
  4. 9:56 What NixOS Manages and What It Leaves Out
  5. 14:02 Top-Level Derivations and Deployment Targets
Transcript

NixOS Origins and Reproducible Builds

0:00 So, let's discuss how NixOS is really different from other distributions and how that difference works. In general, NixOS started as a project from a state like this. We have this student lab as on the picture here, that's from the TU Delft in the Netherlands where Eelco wrote his PhD thesis and also Armijn, Armijn was the actual author of NixOS who did this as his master thesis, where they worked.

0:30 This is the build farm that built all of nixpkgs back then, like 20 years ago. These computers, they look a bit scavenged and so on, so people just put together as much hardware as they could find at that university. They run classical Linux distributions on top of those and then Nix inside that and that built the Hydra build farm or composed the Hydra build farm with which they built all of nixpkgs. The problem was now, as he said in his talk, which we are linking to in the description of this video because this is a really fun one, he said that builds would sometimes fail after updating the underlying system.

1:11 So the problem was that even if they run exactly the same update on exactly those similar systems which have basically the same setup, just different IP names, host names and so on, they would kind of have different problems every time. So that was really difficult to debug and you couldn't reproduce that by just following the same upgrade path on a different system and get the same error because that was not how it worked. So that was kind of, well, let's use the reproducibility of Nix to span that over system configurations instead of just that packages.

Sign in for the full transcript.

About this lesson

Ansible, Puppet, and golden images all promise well managed servers. NixOS takes a different route with its declarative style. This lesson explains how this style fundamentally differs from the existing tools/frameworks Afterwards you can explain the difference to a skeptical colleague in a few sentences.

In this video

  • The university build farm problem that NixOS was invented to solve
  • What Nix already builds for a running system, and what is still missing between a Nix store and a machine that boots
  • Divergent, convergent, and congruent system administration, and which category your current tools fall into
  • Why NixOS rebuilds /etc at every boot, and which folders you still have to back up
  • One configuration, many outputs: the derivation that becomes a live system, a VM, or an ISO image

After this lesson

You have the mental model that the rest of the course builds on, and a clear argument for why NixOS is more than another configuration management tool.

Links: