Nix 101 Course / Section 9: Flakes
Premium

9.6 Flake outputs in depth: packages, apps, checks and more

Lesson 64 of 68 · 20:45

placeholder thumbnail

Sign in, then buy this course to watch

Free account · no credit card needed

About this lesson

Packages and dev shells are only two of the output categories a flake can provide. This lesson walks through the whole set: apps, checks, overlays, nixosModules, nixosConfigurations and formatter, each connected to the command that consumes it. One well-filled checks attribute turns your entire CI into a single nix flake check.

In this video

  • When you need an apps entry and when meta.mainProgram already does the job for nix run
  • Building every test in parallel with nix flake check, and why this is the cheapest CI setup you will find
  • One formatter definition so nix fmt runs the right tools in any checkout, including a treefmt setup driving several formatters at once
  • Why exposing an overlay next to your packages gives users a choice most flakes deny them
  • Which output categories skip the architecture level, how to merge them with the per-system ones, and what happens with custom categories you invent yourself

After this lesson

You know every standard flake output, which command picks it up, and how to lay out a flake that other people enjoy consuming.

Builds on: Anatomy of a flake: inputs, outputs and the lock file (9.2)