YOUR JOURNEY
18 / 18
03THINKING IN FLAKES 6 MIN READ
LESSON 18 / PUT IT ALL TOGETHER

Less mystery.
More intention.

You can now follow the path from a Nix expression to a running system.

Finish with a small project of your own: a locked development shell, a runnable package, and a change you can explain.

Bring it together
~$ Hands-on examples · Nix with flakes enabled.
THE NIX MODEL01 / 03
Drag to rotate

Describe tools and outputs in one small project.

Describe and lock
18.1YOUR FIRST INDEPENDENT PROJECT

Turn the model into muscle memory.

Create a Git repository. Combine the devShells output from lesson 15 with the packages output from lesson 16 inside one outputs attribute set. Keep one shared system binding and one pkgs binding.

Add flake.nix, generate flake.lock, then enter the development shell and run the greeting package. Commit both files. A fresh checkout should resolve the same external inputs on the same supported platform.

terminal · capstone checklist
git add flake.nix
nix flake lock
nix flake show
nix develop -c python --version
nix build
nix run
nix flake check
git add flake.lock
git commit -m "Add reproducible project environment"
Next section: Make the next change a small one.
18.2ONE DELIBERATE UPDATE

Make the next change a small one.

Update the nixpkgs input, read the lock-file diff, and repeat the checks. Note that nix flake check only runs checks you define, alongside validating recognized output shapes; it cannot prove that your entire application works.

You now have the foundations: the store gives packages distinct identities, derivations describe builds, NixOS modules describe a system, and flakes give projects locked inputs and discoverable outputs. Next, package a real project and explore overlays, tests, or Home Manager when you need them.

TAKE THIS WITH YOU

Describe → lock → build → inspect → commit. Keep each change small enough to understand.

YOU’VE REACHED THE END

Now make it your own.

Revisit any lesson from the course menu, or try the capstone above.

Back to the beginning