Harmonia is a source of packages, served directly to clients over the
LAN (in-zone) or the tailnet (when flagged global). The per-zone nix-cache
proxy is a separate concern: it caches the public binary cache
(cache.nixos.org), never harmonia.
Each local-zone host’s substituters become, in priority order:
- the harmonia instances of its own zone (highest priority, LAN), then
- any harmonia flagged
global (typically on the HCS, over the tailnet), then
- the zone’s
nix-cache proxy (public cache).
That order is pinned client-side with ?priority= on each substituter URL
(see nix-cache.nix), because the priority set below is identical on every
instance and Nix sorts substituters by advertised priority, not by list order.
A host running harmonia does not get its own instance as a substituter: it
would only ever serve paths its local store already has.
A global-zone host (www) has no LAN and no proxy: its only fleet substituter
is the global harmonia, over the tailnet.
Other zones’ non-global harmonia are never used. Harmonia’s signature is
passed through unchanged, so every host trusts the deployment-wide harmonia
public key (usr/secrets/harmonia.pub). Transport is plain HTTP on the
trusted LAN / VPN: integrity comes from the NAR signature, not from TLS.