Nix 101 Course
Nix 101: From Zero to Fluent
From your first shell to writing production derivations — without cargo-culting.
Most Nix tutorials hand you a flake and hope. This one builds your mental model from the ground up, so that by the end new Nix errors stop being scary, new Nix tools feel familiar, and you can read and write real-world Nix with confidence.
Why this course is different
- Bottom-up, not copy-paste. We teach the sandbox, the derivation, the hash, and the store in that order — so the magic turns into mechanics you can reason about.
- Honest about trade-offs. Flakes get real coverage, including when not to use them. Docker, Homebrew,
apt, andvenv/uvget a fair comparison so you know exactly where Nix fits. - Hands-on throughout. You'll write
sumandtakeN, package GNUhellowith patches you wrote yourself, and build arelease.nixwith static, patched, and clang-built variants.
What you'll learn
- Nix as a daily-driver package manager and dev-shell tool
- The Nix language — syntax, evaluation model, lazy evaluation, and the idioms you'll actually meet
- How a build really works: sandbox → derivation → hash → store
- Reproducible dev shells with
nix-shellandnix develop, wired intodirenv - Writing derivations from
builtins.derivationup tostdenv.mkDerivation - Composing nixpkgs with
callPackage,override,overrideAttrs, and overlays - Flakes — honest coverage, plus the
npins/nivalternatives - Debugging Nix: reading evaluation errors, tracing expressions, diagnosing build failures
What you'll be able to do afterwards
- Ship a reproducible dev environment your whole team uses from day one
- Package a piece of software and contribute a fix back to nixpkgs
- Debug a Nix error calmly — without panic or StackOverflow roulette
- Move confidently into any advanced course (NixOS, Nix on Mac, ML/CUDA) without re-learning the basics
Who this is for
Developers curious about Nix who bounced off the scattered docs the first time, teams evaluating it for reproducible environments, and current users who copy-paste expressions and want to actually understand them.
No prior Nix — and no functional-programming background — required. Everything works on macOS and Linux.
Prerequisites
Comfort in a Unix shell (bash or zsh), basic programming experience in any language, and a machine where you can install software (we cover installation in the very first lesson).
What's included
Self-paced, hands-on lessons with lifetime access, so the course doubles as your reference long after you finish. Several lessons are free to preview — start with The problem Nix actually solves before you decide.
Lessons
Browse the videos included in this course.
Section 1 — Getting started: install Nix and score your first wins
5 lessonsGet Nix installed cleanly and feel the payoff within minutes — run any tool without installing it, keep the ones you want, reclaim disk space, and set up an editor that makes everything that follows go faster.
1.1 Installing Nix the right way
Get Nix onto your machine correctly the first time. We compare the upstream and Determinate Systems installers, explain single-user versus multi-user setups, and show how to uninstall cleanly — so you can start experimenting knowing you can always back out without leaving a mess.
1.2 Your first commands: nix run & nix shell
Your first taste of the Nix superpower: run any of 100,000+ packages without installing them. With nix run and nix shell you reach for a tool, use it, and let it vanish — no global clutter, no version conflicts, nothing to clean up afterwards.
1.3 Installing tools to keep with nix profile
When you do want a tool to stick around, nix profile is how. Learn to install, list, upgrade, and roll back the packages in your user profile — package management that never strands you on a broken upgrade, because the previous generation is always one command away.
1.4 Garbage collection on day one
Nix keeps every version it has ever built — a feature, right up until your disk fills up. Learn the single command that safely reclaims that space on day one, so storage never becomes the reason you stop exploring. (We return to how garbage collection decides what's safe later in the course.)
1.5 Set up your editor before going further
Spend ten minutes here and the next two hours of language learning go three times faster. We set up nixfmt for formatting and nixd as your language server — autocomplete, jump-to-definition, and inline errors — in VS Code, Neovim, Emacs, or JetBrains. The viewers who skip this step always come back to it, usually after some avoidable frustration.
Section 2 — The Nix language
10 lessonsEvery Nix file you'll ever read or write is in this language. Learn it once — syntax, evaluation model, lazy evaluation, and the everyday idioms — and the rest of the Nix world stops feeling like a foreign alphabet. Includes two hands-on exercises that make the syntax stick.
2.1 Why a config language has functions
Think of Nix as "JSON with functions". In a couple of minutes you'll see why a real language beats static templates for configuration — and why that single design decision is what makes everything else in Nix possible. The natural answer to "why not just YAML?"
2.2 The REPL as a power tool
Meet the Nix REPL — the fastest way to learn the language and a genuine power tool. Watch it patch the hello program live to print a custom greeting, reload with :r, and drop you straight into a shell running the patched build. Three Nix superpowers — overrides, the REPL, and the store — on screen at once, plus the colon-commands (:b, :p, :doc) that make the REPL your daily workbench.
2.3 Nix syntax: the complete tour
The complete tour of Nix syntax in one focused sitting: strings and indented strings (with the tricky ${} escapes), numbers, lists, attribute sets and inherit, functions and currying, let/with scoping and their pitfalls, import, and how to merge sets with // versus lib.recursiveUpdate. After this, nixpkgs source stops looking like a foreign alphabet and becomes something you can actually read.
2.4 Debugging and tracing 101
Every language needs a way to ask "what is this value, really?" Learn builtins.trace, builtins.toJSON, and how to read a Nix stack trace without flinching — plus why there's no step debugger in Nix, and why you won't actually miss it.
2.5 Lazy evaluation, in practice
This is the video that explains 90% of "huh, why didn't that fail?" moments. Through the famous 1/0 puzzle and weak head normal form, you'll finally get lazy evaluation — what it buys you for performance and debugging, and why Nix only ever computes what it truly needs.
2.6 Lists and recursion
The building blocks for everything that follows: head, tail, length, and writing your own recursive functions. We also explain why the syntax is the way it is — so it sticks in your head instead of feeling arbitrary — and set you up for your first hands-on exercises.
2.7 Exercise: write sum
Hands-on: write a function that takes a list of numbers and returns their sum, using head, tail, and length. Ten minutes of real practice that stops you fighting the syntax for the rest of the course.
2.8 Exercise: write takeN
Hands-on: write takeN, a function that returns the first N elements of a list. Together with the sum exercise, this is what turns "I've seen the syntax" into "I can write it" — and it pays off for the rest of the week.
2.9 Common idioms: map, filter, foldl' and friends
The functions you'll reach for every single day: map, filter, foldl', listToAttrs, mapAttrs — and exactly where they live in builtins versus pkgs.lib. A single guided tour through lib/lists.nix (plus noogle.dev for finding the rest) saves more hours than the whole rest of this section combined.
2.10 Importing nixpkgs, properly
How to bring in nixpkgs the right way: import <nixpkgs> { } versus pinning a specific commit for true reproducibility, plus config.allowUnfree and permittedInsecurePackages for the real-world cases the quick tutorials quietly skip.
Instant access
Start watching the moment your purchase completes.
Lifetime access
Buy once and revisit every lesson whenever you need it.
Secure checkout
Payments handled by Paddle, our trusted reseller.
Taught by Nixcademy
The same material we teach in our professional, instructor-led Nix and NixOS classes — built from real training experience helping engineers and teams adopt Nix in production.
What learners say
“I am delighted with the course and the content! The tutor is competent and presents the content in an understandable way and responds to spontaneous questions in detail. The many practical examples have opened up new ideas and horizons for me. The training week was full of aha-effects.”
“Nix is a very promising technology, but I found it very difficult to get started. The Nixcademy helped me a lot to use Nix effectively in my work. The training has given me the practical skills I need to fully evaluate and use Nix.”
“Nixcademy has been a game-changer for me. Working with my mentor has been incredibly rewarding. The personalized guidance and in-depth education have boosted my skills tremendously. I highly recommend Nixcademy for anyone serious about mastering Nix.”