mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
docs: add remaining docs back with some additions/improvements
This commit is contained in:
parent
f147295418
commit
0bd75fd1bb
12 changed files with 538 additions and 1 deletions
50
docs/caching.md
Normal file
50
docs/caching.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Caching
|
||||
|
||||
Nix GitLab CI supports several caching mechanisms to speed up your pipelines.
|
||||
|
||||
## GitLab Runner Cache
|
||||
|
||||
The runner cache strategy copies the new store paths into a directory `.nix-cache`,
|
||||
which is then saved in the regular GitLab cache (technically runner cache).
|
||||
It's also configured as a substituter automatically.
|
||||
|
||||
To enable, set the cache strategy to `runner`.
|
||||
|
||||
Configure it using these environment variables:
|
||||
|
||||
- `RUNNER_CACHE`: path to the runner cache (default `.nix-cache`)
|
||||
|
||||
!!! warning
|
||||
|
||||
This is very inefficient and should probably only be used for very very small
|
||||
dependency counts. Otherwise it takes an eternity to save to cache.
|
||||
|
||||
## Cachix
|
||||
|
||||
Cachix is a hosted binary cache service that can significantly speed up Nix
|
||||
builds by sharing build results.
|
||||
|
||||
To enable, set the cache strategy to `attic`.
|
||||
|
||||
Configure it using these environment variables:
|
||||
|
||||
- `CACHIX_CACHE`: name of the cache to use
|
||||
- (`CACHIX_AUTH_TOKEN`): cachix client itself uses this for authentication
|
||||
|
||||
!!! warning
|
||||
|
||||
Cachix has not been tested. Feedback is appreciated :)
|
||||
|
||||
## Attic (Self-Hosted Cache)
|
||||
|
||||
Attic is a self-hosted, deduplicating binary cache. It's a great option if you
|
||||
want more control over your caching infrastructure and to have the cache closer
|
||||
to your runners.
|
||||
|
||||
To enable, set the cache strategy to `attic`.
|
||||
|
||||
Configure it using these environment variables:
|
||||
|
||||
- `ATTIC_SERVER`: URL of the server
|
||||
- `ATTIC_CACHE`: name of the cache to use
|
||||
- `ATTIC_TOKEN`: auth token from the attic server
|
||||
Loading…
Add table
Add a link
Reference in a new issue