Configuration examples¶
Worked, copy-adaptable configurations that compose the teaching domains (00–15) into one coherent picture. Each leaf is a walkthrough: file layout, annotated Nix, activate/check commands, failure modes, and deep links into concept/module pages—not a second option encyclopedia.
Not this domain: tiny parseable fixtures under meta/examples/. Cite those fixtures when a one-file snippet is enough; use these leaves when the reader needs a multi-file “how the pieces fit” story.
Pins such as nixos-26.05 and system = "x86_64-linux" are illustrative. Flake workflows need experimental nix-command and flakes. Stuck? FAQ → Getting help.
Contents¶
- Minimal flake NixOS host — Single-host flake +
configuration.nixshape through first rebuild - NixOS with Home Manager — System + user profile in one
nixos-rebuild - Project devShell and direnv — Flake
devShells,mkShell, and auto-enter - Custom package and overlay flake —
callPackage, overlay, and flakepackages/ host use - Homelab proxy, services, and secrets — Reverse proxy, firewall, and ciphertext secrets
- Multi-host config repo —
hosts//modules/fleet flake and deploy hooks - nix-darwin with Home Manager — macOS system + user config via
darwin-rebuild - Disko + impermanence host — Declarative disks, tmpfs root, and
/persistsurvivors - nixos-anywhere bootstrap — Remote SSH wipe-and-install of a disko flake
- deploy-rs fleet — Day-2 multi-profile hub deploy on a multi-host flake
- Flake CI with GitHub Actions — Runner install, cache,
nix flake check, host matrix