The Brewhouse
Five ways to brew the same pint
Every NixOS config ends up describing a computer. What changes is how the recipe is organised: one file, a pinned flake, or a whole brewery of modules. Here’s each method, simplest first, with the same order poured every way.
Before you read on
You don’t need any of this on day one. Start with the house pour, which is the configuration.nix the installer gives you, and come back when you’ve got more than one machine, or when your one file starts to feel crowded.
One example, five ways
Each page below turns on Steam, so you can compare the methods on the same job. The Steam line is identical every time. What differs is the structure around it, and how well that structure copes as you add machines and users.
The ladder, simplest first
- The house pour Vanilla configuration.nix One file in /etc/nixos, exactly what the installer gives you.
- Bottle-conditioned Flakes Your config plus a lock file that pins every input. Same pint, every time.
- The recipe book flake-parts Splits a flake into separate modules, so a growing config stays tidy.
- Grown, not built The dendritic pattern Organise by feature, not by machine: every file is a module, and they're all loaded automatically.
- The full brewery den A framework for NixOS, nix-darwin and Home Manager together, organised into reusable "aspects".
The tasting board
Five ways to brew the same pint, side by side.
| Method | Good first brew? | Needs flakes? | Several machines | Learning curve |
|---|---|---|---|---|
| Vanilla configuration.nix | Yes, start here | No | One at a time | Gentle |
| Flakes | Yes, with a guide | Yes | Yes, by hand | Gentle |
| flake-parts | Once you know flakes | Yes | Yes, tidily | Moderate |
| The dendritic pattern | Not yet | Usually (not required) | Built for it | Steep |
| den | Not yet | No (optional) | Built for it, Macs too | Steep |
Which brew?
Pick the one that sounds most like you.
Stick with the house pour.
The configuration.nix the installer made is all you need for now. Learn to add apps, rebuild and roll back first.
- Nothing new to learn beyond your config file
- Every guide’s examples still work for you
- Moving to flakes later is a small step
Bottle it with flakes.
Flakes pin the exact version of everything you use, so a rebuild next month, or on another PC, gives you the same system.
Read about flakes-
A
flake.lockrecords every ingredient - Easy to keep your config in git
- Most configs you’ll read already use flakes
Try flake-parts, then the dendritic pattern.
Once a desktop, laptop and server share settings, a single flake file gets crowded. flake-parts splits it up; the dendritic pattern organises it by feature.
Read about the dendritic pattern- Share one gaming or desktop module across machines
- Each machine says what it is, not how to build it
- Worth the extra learning once you have three or more hosts
Have a look at den.
If you’re managing NixOS, a Mac with nix-darwin and Home Manager users from one place, den gives you a framework built for exactly that.
Read about den- One “aspect” can configure the system, the Mac and your user
- Works with or without flakes
- The newest and steepest option here, so try it in a test repo first