Guided Repository Tour
- Type: Tutorial
- Status: Current
- Scope: First reading path through the registered
nixos-configflake- Canonical sources:
flake.nix;hosts/electra/default.nix;hosts/vega/default.nix;modules/common/base.nix;modules/profiles/;modules/services/;home/users/nimmo/default.nix;lib/auto-update-policy.nix; Repository Structure and Import Chain- Last verified: Source commit
556df88494686003b1c4f20c8e0b99b5afc16a6e(2026-09-12); source HEADb2831d33132967b4c4fb69e6068b2b05fff8fdffchanges onlyflake.lock. Builder and selected imports checked 2026-09-13; no configuration was activated.- Review triggers: Flake outputs or builder, host registration/imports, Home Manager entry point, profile ownership, inventory fields, or updater input policy
Learning goal and prerequisites
Follow one host from the flake entry point to its NixOS modules and Home Manager user configuration. You need only basic Git and Linux familiarity; the rest of this path teaches Nix syntax and module merging. Read files in the source checkout, not a dated export. The repository is authoritative; this page is a map for learning, not a second configuration inventory.
Walk the composition
- Open
flake.nix. Itsinputsname external sources;flake.lockpins their resolved revisions. Underoutputs, findnixosConfigurations. The currently registered targets are Electra, Lena, Vega, Lyra, Cosmos, and Chaos.potential/novais staged and not in that set. Its presence does not prove Nova runs NixOS; Nova currently runs Fedora. - Pick
vega = makeNixosSystem { configName = "vega"; };. The sharedmakeNixosSystembuilder supplies SOPS, Home Manager, Paseo, the standalone updater, cache settings, and the host import./hosts/${configName}. Cosmos and Chaos instead pass the stable Nixpkgs and matching Home Manager inputs to this same builder. - Open
hosts/vega/default.nix. Itsimportscompose common and server foundations, hardware/Disko files, selected service modules, networking, and the system user. The host setsnetworking.hostName, inventory metadata undernixosConfig.host, host storage, and service values. An imported module can be option-gated: its presence inimportsalone may not enable the service. Trace an actualnixosConfig.<service>.enablevalue before saying a service is declared active. - Follow one import, for example
modules/services/bookstack.nixfrom Vega. Its option declaration defines the interface; itsconfig = mkIf cfg.enable { ... };contributes runtime state, SOPS paths, listener, backup intent, and monitoring only when enabled. Contrast an import-to-enable module inmodules/profiles/. The Configuration Ownership Boundaries page explains why a host selects and parameterises reusable capabilities rather than copying every service implementation inline. - Return to
flake.nixand findhome-manager.users.${config.nixosConfig.primaryUser}. It importshome/users/<primaryUser>/for every registered host. Inhome/users/nimmo/default.nix, the desktop import is conditional onisServer, an argument supplied throughhome-manager.extraSpecialArgs. This is a separate Home Manager argument path from NixOSspecialArgs. - Look at
lib/auto-update-policy.nix. Root flake inputs are classified by actual consuming hosts so the update pipeline validates the right targets. Adding an input or host is not complete merely when the flake evaluates; the guarded update surface must also be reviewed.
A safe exercise
Choose one registered host and one service or profile it imports. Without editing or deploying, write down: (a) the flake target, (b) the host entry module, (c) the selected import, (d) any enable option, and (e) the runtime or package declaration. Check your chain against Repository Structure and Import Chain and the relevant current Service Catalogue entry.
Then compare Electra's hosts/electra/default.nix with Vega's. Electra's
base and igpu/dgpu specialisations are one registered target, not three
flake outputs. The specialisations describe physical GPU presence; do not
switch modes as a workload preference. ADR-001
explains why, and Safe Testing and Deployment
owns activation rules.
Common mistakes and next reading
- An import says where configuration may enter; check
mkIf, options, assertions, and host values before claiming a unit exists. flake.lockpins build inputs, but mutable services, external data, SOPS values, and deployment state are not contained in that file. A build is not proof of live health.- Untracked files are omitted from Git-backed flake evaluation. Stage a new
.nixfile before testing; do not need to change any file for this tour.
Next in this learning sequence is Nix Language Essentials; use the official Nix language basics for deeper language study. For the complete current architecture use the Engineering Handbook, not the retired generic course chapters in wiki Git history.