❄️NixOS
Layer 1. Every physical host runs NixOS, configured under
nix/and declared inflake.nixvia amkHosthelper (nix/lib/mkHost.nix). See Fleet for the concrete machines.Layout
nix/hosts/<hostname>.nix— per-host entry points (the Pis,spore,oldboy); k8s nodes are defined directly inflake.nixwithrole/tagsand pull in the k8s service modulesnix/hardware/— hardware profiles (pi4, pi5, x86)nix/services/— optional service modules (k8s/,common.nix,kiosk.nix,iperf3.nix, …)nix/system/— core modules: SSH hardening, Tailscale, auto-upgrades, users, disko, chezmoinix/overlays/— package patches and overridesnix/images/— buildable images: WSL tarball, ISO, GCE, container, netboot, and the pi5 RAM image
Host groups
folly k8s nodes:
optiplex(control-plane),riptide,shaleoffsite k8s nodes:
retrofit(control-plane),oldschoolRaspberry Pis:
cloudpi4,homepi4,weatherpi4,dns,rackpi5(diskless — see ADR/0008 Diskless netboot for rackpi5),spore(NFS/PXE server)Cloud:
oldboy(GCE)
Deploying
Build without deploying:
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevelDeploy immediately:
nixos-rebuild switch --flake .#<hostname> --target-host <hostname> --sudoDeploy safely (activates on next reboot):
nixos-rebuild boot --sudo --target-host <hostname> --flake .#<hostname>Roll back on the host:
sudo nixos-rebuild switch --rollback
Auto-upgrades keep git honest
Hosts auto-rebuild from GitHub
main. A config deployed from a branch silently reverts on the next upgrade cycle unless the branch merges promptly. Treatnixos-rebuildfrom a branch as a test, not a deploy.
Disk layout
Partitioning is declarative via disko with GPT partlabels (
disk-main-*). Hosts installed before the migration need their partitions relabeled or they fail to boot — see ADR/0004 Disko with GPT partlabels and the scripts innix/scripts/.
Dotfiles
chezmoi-managed from the in-repo
dotfiles/tree; an activation script applies them from the store path on every rebuild/boot, no network clone. See ADR/0006 Dotfiles vendored in-repo with chezmoi.
Linked references 8
One page per machine with live-surveyed hardware facts (vendor, model, serial, CPU, RAM, storage, OS — collected over SSH on 2026-07-08). blinkypi0 and eviropico are pulled forward from systems/rpi/ history (the df20515b graveyard cleanup); Fleet holds the cluster/role tables. See Architecture/NixOS for deploy mechanics.
Use this when building, deploying, or rolling back a NixOS host from this repo. Host inventory lives in Fleet; architecture background lives in Architecture/NixOS.
Layer 1 — Bare metal: Architecture/NixOS configurations for every physical host, deployed with nixos-rebuild and kept honest by auto-upgrades from main.
Every physical (and one virtual) host, from flake.nix. Each has a dedicated page under Hosts with serials, hardware, and quirks (surveyed live 2026-07-08); deploy mechanics in Architecture/NixOS.