Operator Roadmap¶
Path for people who run and maintain NixOS systems: rebuilds, upgrades, rollbacks, deploy, secrets, caches, and troubleshooting. Prefer operations and infra pages; pull concepts only as needed to act safely. This page is a curated reading order only — no runnable example.
Goals¶
- Rebuild, test, boot, and roll back generations with a clear activation model
- Upgrade channel- or flake-pinned systems without painting yourself into a corner
- Deploy to remote hosts and keep secrets, trust, and binary caches under control
- Diagnose failed builds, activation, and substituter problems with the right CLI
Prerequisites¶
- A working NixOS host (or VM) you can rebuild
- Comfort with a shell and SSH; no need to write packages or modules yet
- Optional: skim Beginner if store/flake vocabulary is new
- Keep Reading manuals and search handy for option lookups
Reading order¶
Mental model (short)¶
- Generation, Profile, Closure, Store Path — what a system generation is
- Generations and Boot, Activation Script — how NixOS applies a new system
- Flake (concept) vs Channel; optional Flakes vs Channels
- Flake ops: nixosConfigurations, lockfile; channel ops: nix-channel
Day-2 NixOS operations (core)¶
- Hub: NixOS Operations
- rebuild switch / boot / test
- Rollbacks
- Upgrades
- Remote Deploy
- Troubleshooting
- Frontends: nixos-rebuild, nh, nh / nvd / nixos-rebuild
Config you must touch to operate¶
- configuration.nix, Imports and Profiles
- Secrets Strategies
- Disk / persist: Disk and persistence → Partitioning and Bootloaders, disko, Disko recipes, Impermanence
- Desktop hosts (optional): NixOS Desktop — compositors, PipeWire, fonts, Flatpak/FHS, Steam, printing
- Install/bootstrap only as needed: Install and bootstrap chooser → nixos-anywhere, disko
- Optional deepeners: Secure Boot and Lanzaboote, ZFS and Btrfs, Specialisations, Enterprise identity, Overlay networks, Firmware and microcode
- Bootstrap / edge (when relevant): Netboot and PXE, Airgap and offline, nix copy and bundles
- Non-NixOS clients (optional): WSL and foreign OS — Nix on Windows/macOS/Linux alongside NixOS fleet ops
Scenario paths (pick one track)¶
Risky change on production — read in order: rebuild switch / boot / test (test first) → rollbacks → troubleshooting activation vs systemd table → FAQ: common errors.
Pin bump (channel or flake) — upgrades → flake lockfile or channel → specialisations if you maintain boot variants on the same host.
Fleet / multi-host — Fleet deploy chooser → remote deploy → machine mesh + inter-machine trust → tool pick: Colmena / deploy-rs / Clan and mesh → overlay networks when SSH/store URIs need VPN → private cache mesh when several hosts share private substituters.
Disconnected or lab site — airgap and offline → nix copy and bundles → binary cache hosting → netboot and PXE for LAN imaging.
Desktop laptop ops — networking → NixOS Desktop → secrets strategies for Wi‑Fi PSKs.
Homelab / self-hosted — homelab patterns → homelab proxy, services, and secrets (worked example) → common service examples → backups and restore → overlay networks for tailnet-only exposure.
Multi-host flake repo — config repo layout → multi-host config repo (worked example) → nixosConfigurations → imports and profiles.
Disk + ephemeral root — disk and persistence (cheatsheet) → Disko + impermanence host (worked example) → disko / impermanence.
Remote install then day-2 fleet — install and bootstrap → nixos-anywhere bootstrap (worked example) → fleet deploy → deploy-rs fleet (worked example) → remote deploy.
Config flake CI — CI with Nix → Flake CI with GitHub Actions (worked example) → binary caches (cheatsheet).
Virtualization and guests (optional)¶
- Hub: NixOS Services
- Libvirt and VMs, MicroVMs
- Containers: Containers and nspawn, Declarative containers, Docker and Podman
- Mental model vs orchestrators: Nix vs containers / orchestrators
CLI and daemon config¶
- Hub: CLI and Tooling
- Daily: nix flake, nix store ops, nix-store, nix-collect-garbage
- Daemon: nix.conf, Trusted Users and Substituters
- Quick lookup: CLI cheatsheet; optional nix.conf knobs; symptom table: FAQ: common errors
Store, caches, and GC¶
- Hub: Store and Build
- Binary caches (cheatsheet) → Binary Caches, Substitutes and narinfo
- Store protocols —
--storevs substituters vs remote builders - Garbage Collection, Remote Builders
- Hosting your own: Binary Cache Hosting; multi-host wiring: Private cache mesh
Deploy and infra¶
- Hub: Deployment and Infra
- Tools: Colmena, deploy-rs, Morph / Nixinate
- Optional: Terraform + NixOS, Hydra, Amazon / GCE / Azure
- Optional deepeners: Airgap and offline, nix copy and bundles, Clan and mesh
- Secrets on the wire: agenix / sops-nix
Security and trust¶
- Hub: Security and Trust
- Trusted Users, Signing and Caches
- Secrets Management, Supply Chain
- Mesh / interconnect (concept): Machine mesh, Inter-machine trust
- Optional deepeners: SSH and age plugins, AppArmor and SELinux, Reproducible builds audit
Next steps¶
- Keep NixOS Operations and CLI cheatsheet bookmarked while you run systems
- Stuck on a message: FAQ: common errors before deep-diving every leaf
- Still stuck after FAQ/troubleshooting: Getting help and community
- Developers on Windows/WSL in the same org: WSL and foreign OS (client Nix) plus this roadmap (NixOS servers)
- When you need to change packages or modules upstream, switch to Contributor
- Glossary fallback: glossary.md
See also¶
- Learning roadmaps — path chooser
- Beginner — first-pass philosophy, concepts, and a working system
- Reading manuals and search — manuals + search.nixos.org
- Contributor — packaging and module authorship
- Configuration examples — picture-perfect multi-file host/fleet/homelab configs
- Security and Trust — daemon trust, signing, secrets, inter-trust
- Machine mesh — multi-machine reachability / build / deploy axes
- Airgap and offline · Netboot and PXE · Specialisations