Nix 101 Course / Section 1: Getting started: install Nix and score your first wins
Premium

1.1 Welcome: is this Nix training for you?

Lesson 1 of 68 · 11:05

placeholder thumbnail

Create a free account to watch this lesson

Free account · no credit card needed

Video chapters

  1. 0:00 Why Nix Is Worth Learning
  2. 0:58 How This Course Is Structured
  3. 2:34 Nix Basics and the Language
  4. 3:55 Derivations, Sandboxing, and Package Building
  5. 5:34 Project Structure, Overrides, and Overlays
  6. 7:18 Flakes and When to Use Them
  7. 8:40 What You’ll Be Able to Do
  8. 10:03 Requirements, Time Commitment, and Wrap-Up
Transcript

Why Nix Is Worth Learning

0:00 Hello, chances are that you stumbled upon Nix and NixOS already and find it hard to get into. In my experience and my opinion, Nix is really worth getting into it because, for example, it's the biggest package repository in the world as by when you look at the Repology.org graph. Also, it is considered one of the top open source projects. In 2022, it kind of surfaced like this for the first time on the GitHub Universe conference.

0:32 And all the big names use it already. So it's really worth diving in. It has been relevant for years already and gets more and more relevant the next year. So if you regard learning Nix as an investment, you're totally right. It really is. So let's talk about this video course and how it could help you getting into it. The first thing is that we kind of learn Nix slightly differently than with normal tutorials. You see, when you look at normal tutorials, they show you like, OK, let's install Nix and then do this. And then you suddenly have some kind of image running somewhere.

How This Course Is Structured

1:11 And what if you update stuff, change stuff to your requirements and stuff like that? And then it doesn't work any longer. That's exactly the problem that you might already have at work after following countless tutorials or short videos. What we do here is we first go over the Nix basics, right? So we explain you what is the real user experience that you're supposed to get with which commands. And then after we understood that, we will start learning about the Nix language. So the Nix language is slightly different than other programming languages. First of all, because it's a functional and lazily evaluated programming language, which many people find really strange, but it's actually helpful in building packages.

Sign in for the full transcript.

About this lesson

You have run into Nix, followed a few tutorials, and watched the whole thing fall apart the moment you needed something the tutorial did not cover. This free opening video makes the case that Nix is worth the investment, then shows exactly how this course gets you there: what it teaches, in which order, what you can do at the end, and what you need on your machine to follow along.

In this video

  • Why tutorial-first learning breaks the first time you change something, and the order we teach in instead: the commands, then the language, then the sandbox, then packaging
  • The route through the course: builtins.derivation the quick way, then mkDerivation with its phases and hooks, then project structure, then overrides and overlays
  • Why flakes come last, the conversation with people from the NixOS Foundation behind that order, and the customers who stopped using flakes for certain projects
  • What you can do afterwards: a dev shell that falls out of your package definition for free, pinned dependencies that still build in ten years, patch sets you can vouch for, cross compilation and static linking
  • What you need to follow along: a Linux or macOS machine or a VM, root rights, and internet. WSL usually works. Plus the one environment to avoid, because it leaves you with only the bad parts of Nix.

After this lesson

You know what the course covers, in which order, and whether your machine and your calendar fit it. The 14 hours are split into lessons of five to 20 minutes, so a lesson fits into a coffee break, and lifetime access means you can watch them in any order and come back to them later.

Links: