Maintenance & Utils
Aeroflare provides a suite of utility commands for interacting directly with blobs and preparing store paths. These commands are useful for operators directly manipulating the cache states and for developers extending Aeroflare's core workflows.
push-blob and pull-blob
These lower-level utilities offer direct OCI blob interactions. They are heavily utilized for manual state debugging or bespoke cache layer manipulations without relying on Nix commands.
Usage:
aeroflare push-blob <file-path>
aeroflare pull-blob <digest> <output-file>
Technical Mechanics
push-blob: Resolves the target registry and repository configuration, grabs the appropriate token, and wrapsnetwork.PushBlob(filePath, ...). It streams the given file payload directly to the OCI registry as a single blob and returns its final computed digest.pull-blob: Wrapsnetwork.PullBlob(digest, outFile, ...). It queries the registry for the specified blob digest and streams the bytes down, writing them locally tooutFile.
prepare
The prepare command is essential for processing Nix store paths into valid NAR archives and corresponding narinfo metadata prior to registry submission.
Usage:
aeroflare prepare --store-path <path> [flags]
aeroflare prepare --input <file> [flags]
Flags:
--store-path/--input: Pass a single store path or a batch input file.--output-dir(default:./output): Directory for generated.narand.narinfoassets.--compression(default:zstd): Formats supported viacompress.ParseType()(zstd, xz, gzip, none).--workers(default:50): Parallelization limit for batch workloads.--prepare-refs: Enable recursive preparation of missing references one-level deep.--signing-key: Provide an ed25519 signing key generated vianix key-gen-secret.--upstream-cache(default:https://cache.nixos.org): The upstream cache for evaluating missing store references.
Technical Mechanics
- Input & Config: Constructs a
prepare.Configpopulated with parsed compression routines, the parsedsigning.PrivateKey, and concurrency parameters. - Processing Pipelines:
- Single targets evaluate through
prepare.Prepare(). - Batch targets utilize
prepare.PrepareBatch(), dispatching to a worker pool bound by the--workersflag.
- Single targets evaluate through
- Reference Tracking: It evaluates
.narinfofiles against the configured--upstream-cache. If--prepare-refsis true, the resolver fetches missing downstream dependency boundaries (one level deep) and prepares them concurrently. The results compile into aprepare.Resultstruct, detailingMissingRefs,MissingRefResults, and boolean signature status (Signed).