GitLab CI¶
Create new binary cache on https://app.cachix.org/cache and generate a write auth token.
Replace
mycache
in the following.gitlab-ci.yml
with your cache name:
image: nixos/nix:2.3.12
build:
variables:
CACHIX_CACHE_NAME: mycache
before_script:
- nix-env --install --attr nixpkgs.cachix
- cachix use "$CACHIX_CACHE_NAME"
script:
- cachix watch-exec $CACHIX_CACHE_NAME -- nix-build default.nix
Follow variables configuration tutorial to export
$CACHIX_AUTH_TOKEN
.