OCI Integration Protocol
Aeroflare bridges the Nix ecosystem and standard container registries by mapping Nix archive (NAR) artifacts and their metadata directly into Open Container Initiative (OCI) primitives.
The .narinfo to Manifest Mapping
In a traditional Nix binary cache, .narinfo files serve as plain-text metadata describing a store path, its dependencies, its compression format, and its cryptographic signatures.
Aeroflare eliminates the need for a separate .narinfo storage mechanism by embedding this metadata directly into the OCI Image Manifest Annotations.
When pushing a package:
- The compressed
.narblob is uploaded to the registry as a standardv1.Layerwith the media typeapplication/vnd.aeroflare.nar.v1+<compression>. - An OCI Manifest (
types.OCIManifestSchema1) is created to reference this layer. - The contents of the
.narinfoare serialized into the manifest's annotations using thevnd.aeroflare.nar.*namespace.
Annotation Schema
Nix .narinfo Key | OCI Annotation Key |
|---|---|
StorePath | vnd.aeroflare.nar.storepath |
URL | vnd.aeroflare.nar.url |
Compression | vnd.aeroflare.nar.compression |
FileHash | vnd.aeroflare.nar.filehash |
FileSize | vnd.aeroflare.nar.filesize |
NarHash | vnd.aeroflare.nar.narhash |
NarSize | vnd.aeroflare.nar.narsize |
References | vnd.aeroflare.nar.references (space-separated) |
Deriver | vnd.aeroflare.nar.deriver |
System | vnd.aeroflare.nar.system |
Sig | vnd.aeroflare.nar.sig |
On-the-Fly Reconstruction
When the Nix daemon requests a <hash>.narinfo file:
- The Aeroflare proxy translates this into an OCI manifest fetch for
registry/repository:<hash>. - The proxy reads the
vnd.aeroflare.nar.*annotations from the manifest. - It reconstructs the plain-text
.narinfofile format in memory and serves it to the Nix daemon with thetext/x-nix-narinfocontent type.
This allows standard OCI registries (like GHCR) to act as fully functional Nix binary caches without requiring any custom server-side logic or database indexing.