Skip to content

✨ darkone.service.nix-cache

Per-zone Nix binary-cache proxy (nginx proxy_cache).

Caches the public Nix cache (cache.nixos.org) on the zone gateway so a fleet-wide deploy pulls each closure from the WAN once, then serves it over the LAN to every other host. Locally built paths are served straight from harmonia (see harmonia.nix); this proxy never fronts harmonia.

  • enable bool the per-zone Nix binary-cache proxy (nginx in front of cache.nixos.org)
  • maxSize str Maximum on-disk cache size; nginx evicts least-recently-used entries beyond it.
  • roaming bool Nomadic host (laptop moved between zones): replace the zone-pinned substituters with the zone-neutral names every zone’s DNS resolves to its own cache services. Outside any DNF zone the names NXDOMAIN instantly and Nix falls back to cache.nixos.org. Declared by the roaming feature in config.yaml; set it by hand for a temporary move.
darkone.service.nix-cache = {
enable = false;
maxSize = "100g";
roaming = (host.features or { }) ? "roaming";
};

Source: modules/service/nix-cache.nix 🡕