Skip to content
kasha

How it fits

CI / laptopnix copy · token→kasha box
kasha boxmirror up · mirror down↔S3 remote
NixOS hostssubstitute: box → remote←kasha box

Off the LAN, hosts fall back to the remote cache after a low connect timeout.

Net-local Nix binary cache box.

Nix binary cache · single static binaryServes signed Nix store paths at LAN speed, accepts authenticated nix copy pushes over HTTP, and mirrors generations to and from a durable S3-compatible remote cache.
Terminal window
docker pull ghcr.io/zebradil/kasha-box:edge

Features

01

LAN-speed substitution

Serves signed Nix store paths from a flat binary-cache store on the local network. A miss is a 404, or with pull-through on, a path the box fetches, verifies and keeps.

02

Authenticated pushes

Accepts plain nix copy pushes over HTTP with netrc or bearer auth; writes are refused when no token is set.

03

Eager bidirectional mirror

Pulls manifest-listed generations down from an S3-compatible remote cache before anyone asks, and mirrors local pushes back up.

04

No signing key on the box

Every ingested narinfo must carry a trusted signature or a CA field that reproduces its store path; the box verifies and never signs.

05

One static binary

No nix and no database on the box; the index is rebuilt by scanning narinfos at boot. Ships as an OCI image built around that binary.

06

Host-scoped client selection

A NixOS module puts the box first and the remote cache second, with a low connect timeout for off-network fallback.

Components

One binary with six commands, a NixOS module for consumers, and a push script for producers.

kasha serve
The box: cache server, mirror workers, GC timer.
kasha emit
Build and publish a v3 generation manifest.
kasha gc
Sweep the remote cache from CI.
kasha ls
List remote generations and what gc would keep.
kasha upload
Upload a local binary cache, for auth=gcp remotes.
nixosModules.consumer
Box first, remote second, low connect-timeout.
kasha-cache-push
Resolve → sign → push → emit.
oci-image
ghcr.io/zebradil/kasha-box

Links