Files
quixos/docs/NIX_PHILOSOPHY.md
T
2026-06-29 09:45:08 -07:00

1.3 KiB

Quixos Nix Philosophy

Quixos hosts should follow Graham Christensen's "Erase your darlings" model: the booted root system is disposable, and durable state is explicit.

Practical rules:

  • Treat NixOS configuration, flake inputs, and Terraform state as the source of machine shape.
  • Keep mutable service data under /persist, backed by an attached volume that is intentionally retained for that service lifecycle.
  • Do not rely on ad hoc files under /, /var, or user homes unless they are recreated from Nix or live under /persist.
  • Prefer SSM Session Manager over SSH. Enable SSH only when the deployment asks for it.
  • Keep nix-command and flakes enabled everywhere, and provide nixrb for the host's normal rebuild path.
  • Install the same small operator toolbox on service hosts: rg, jq, vim, tmux, screen, htop, file, dig, wget, rsync, unzip, and related basics.
  • Keep bootstrap infrastructure boring. State buckets, cache servers, and future git/image builders should each have clear lifecycle boundaries instead of sharing mutable volumes across unrelated machines.

The intended failure mode is that a host can be rebuilt, rebooted, or replaced without mystery state, with only /persist and external services carrying durable data.