1.0 KiB
1.0 KiB
Cachix for this repo
This repo's NixOS flake lives under nixos/.
The workflow in .github/workflows/cachix.yml can build the strixi-minaj
system closure on GitHub Actions and push the results to a Cachix cache.
One-time setup
- Create a Cachix cache (on cachix.org).
- Create a Cachix auth token with write access to that cache.
- In the GitHub repo settings:
- Add a repo variable
CACHIX_CACHE_NAME(the cache name). - Add a repo secret
CACHIX_AUTH_TOKEN(the write token).
- Add a repo variable
After that, pushes to master will populate the cache.
Using the cache locally
Option A: ad-hoc (non-declarative)
cachix use <your-cache-name>
Option B: declarative via flake nixConfig (recommended for NixOS)
- Get the cache public key:
cachix show <your-cache-name>
- Add it to
nixos/flake.nixundernixConfig.extra-substitutersandnixConfig.extra-trusted-public-keys.
Note: nixos/nix.nix sets nix.settings.accept-flake-config = true, so the
flake nixConfig is honored during rebuilds.