The Brewhouse · Step 1 of 5 · The house pour

Vanilla configuration.nix

The house pour: one file, configuration.nix, describing your whole machine. It’s what the installer creates, what the official manual teaches, and the right place to start.

Who it's for

Everyone, to begin with. Plenty of people with one machine never need more.

Move up when

You want your config in git with exact versions pinned, or you’ve got a second machine to set up.

The pour

The installer writes two files to /etc/nixos/. You edit configuration.nix; hardware-configuration.nix describes your disks and drivers and is best left alone.

# /etc/nixos/configuration.nix
{ config, pkgs, ... }:
{
  imports = [ ./hardware-configuration.nix ];

  programs.steam.enable = true;
}

Then apply it:

sudo nixos-rebuild switch

How it works

The channel decides which version of every package you get: a stable release, or unstable. sudo nixos-rebuild switch --upgrade updates the channel and rebuilds in one go.

When the file gets long, split it up. Any file can pull in others:

imports = [
  ./hardware-configuration.nix
  ./gaming.nix
  ./desktop.nix
];

That’s all “modules” are: files that add settings. Every method further up the ladder is a different way of organising these same modules.

Why people like it

  • Nothing to set up: it’s already on your machine after installing.
  • The NixOS manual and most beginner guides use this layout.
  • Easy to split into a few files with imports as it grows.

What it costs you

  • Versions come from your channel, which updates separately from your config. Two machines built a week apart can differ.
  • Lives in /etc/nixos, owned by root, so keeping it in git takes a little setting up.
  • Sharing settings between several machines is possible, but you’ll be building the structure yourself.

Regulars brewed this way

None of The Regulars are brewed this way yet. Got one? Submit your config.

Further reading

Last checked against the projects' own docs: 11 November 2026. These tools move quickly; spotted something out of date? Open a pull request.