YOUR JOURNEY
02 / 18
01NIX FUNDAMENTALS 4 MIN READ
LESSON 02 / THREE NAMES, THREE JOBS

Meet the
Nix family.

Nix, Nixpkgs, and NixOS belong together. They do different jobs.

Start with the package manager on the Linux system you already have. You don’t need to change your operating system to learn Nix.

Explore the lesson
~$ Build your understanding, one idea at a time.
THE NIX MODEL01 / 03
Drag to rotate

The Nix language describes values and build recipes.

Nix languageNix manager
02.1THE TOOLKIT

One ecosystem. Different layers.

Nix is both a package manager and the name of the language used to describe builds. The manager evaluates expressions, obtains dependencies, and realizes build outputs in the store.

Nixpkgs is a repository of package definitions and supporting libraries. A package attribute such as hello selects a definition from this collection; it is not simply the name of a downloaded archive.

Next section: NixOS takes the idea further.
02.2THE OPERATING SYSTEM

NixOS takes the idea further.

NixOS is a Linux distribution that uses Nix to construct its system configuration: packages, services, users, and much more. Nix on another distribution manages Nix packages; it does not take over that distribution’s system configuration.

Flakes, which we reach in chapter three, give a Nix project a common entry point and a way to lock its inputs. They are neither an operating system nor a replacement for Nixpkgs.

terminal
# On a machine with Nix installed
nix --version
 
# Nix is usable without installing NixOS.
TAKE THIS WITH YOU

Nix is the tool and language; Nixpkgs is the package collection; NixOS is the distribution.

Go a little deeperNix introduction
UP NEXT

Inside the Nix store

Packages have their own addresses, so versions can coexist.

Next lesson