SNOWSTEAD DOCS Home Dashboard

Getting started

Add a Snowstead cache to Nix, and every machine downloads what's already built instead of building it again. This takes about ten minutes.

This machine
The steps below change to match.

A machine that reads downloads what the cache already holds and uploads nothing. A machine that reads and writes also uploads what it builds, so other machines skip that work and use what it uploaded. Writing always needs a token that can write. You choose which machines get one.

1. Create a cache

Sign in to the dashboard and create a cache. Most teams start with one called main. Choose who can pull from it now: anyone, or only machines with a pull token. You can't change this once the cache has paths.

2. Read from the cache

Add the cache as a substituter, with its public key so Nix trusts what it downloads. Your cache's page in the dashboard has this snippet with its real URL and key filled in. For the organization uzair and cache main:

configuration.nix
nix.settings = {
  substituters = [ "https://uzair.snowstead.com/main" ];
  trusted-public-keys = [ "<the key from your cache's page>" ];
};

Cache reads use https://<org-slug>.snowstead.com/<cache> for both public and private caches.

After a rebuild, Nix downloads anything another machine already pushed instead of building it. Machines share builds for the same system, such as x86_64-linux or aarch64-darwin, from the same inputs, so keep flake.lock in the repository. For a private cache, machines also need a pull token: see Private caches.

To change the key a cache signs with, use Signing key on its page: make a new key or import one you made with nix key generate-secret, add it to every machine's trusted-public-keys, then switch to it. Paths signed before keep their old signature, so keep trusting the old key too; the snippet on the cache's page lists every key.