Skip to content
Cachix

GitLab CI

  1. Create new binary cache on https://app.cachix.org/cache and generate a write auth token.
  2. Replace mycache in the following .gitlab-ci.yml with your cache name:
image: docker.nix-community.org/nixpkgs/cachix-flakes
build:
variables:
CACHIX_CACHE_NAME: mycache
before_script:
- cachix use "$CACHIX_CACHE_NAME"
script:
- cachix watch-exec $CACHIX_CACHE_NAME -- nix-build default.nix
  1. Follow variables configuration tutorial to export CACHIX_AUTH_TOKEN=....