This repository uses Cachix to provide pre-built binaries for faster builds and CI/CD.
The binary cache is automatically configured in the flake. You don't need to do anything special - just use the flake normally and you'll get cached builds when available:
# These will use pre-built packages from cache
nix develop
nix build .#cex
nix shell github:devnw/flakes#fmt-
Install Cachix:
nix-env -iA cachix -f https://cachix.org/api/v1/install
-
Get an authentication token:
- Visit https://app.cachix.org/cache/oss-devnw
- Generate a personal auth token
-
Set your auth token:
export CACHIX_AUTH_TOKEN=your_token_here -
Configure Cachix:
make setup-cachix
The GitHub Actions workflows automatically build and push packages to Cachix on:
- Every push to main branch
- Daily scheduled builds
- Manual workflow dispatch
# Push all package sets
make push-cachix
# Push individual scripts only
make push-scripts-cachix
# Push specific packages
nix build .#cex | cachix push oss-devnw
nix build .#commonPackages | cachix push oss-devnwFor CI/CD to push to Cachix, ensure the CACHIX_AUTH_TOKEN secret is set in repository settings:
- Go to repository Settings > Secrets and variables > Actions
- Add new repository secret:
- Name:
CACHIX_AUTH_TOKEN - Value: Your Cachix auth token
- Name:
- Faster CI/CD: Pre-built packages reduce build times from minutes to seconds
- Developer Experience: Instant
nix developshell activation - Bandwidth Savings: Binary downloads instead of source compilation
- Consistency: Same builds across all environments
The cache includes:
cex- Curl and Execute utilityfmt- Code formatting scriptlint- Code linting scripttidy- Code organization scriptupgrade- Dependency upgrade scriptfuzz- Fuzzing test scriptfuzz-go- Go-specific fuzzing scriptlicense- License management scripttag- Version tagging script
commonPackages- Common development toolsgoPackages- Go development environmentterraformPackages- Terraform toolsansiblePackages- Ansible environmentnixPackages- Nix development toolsuiPackages- UI development environmentzigPackages- Zig development environment
All development shell environments are pre-built and cached for instant activation.
# Check if authenticated
cachix authtoken --help
# Re-authenticate
make setup-cachix# Verify token has push permissions
echo $CACHIX_AUTH_TOKEN | cachix authtoken --stdin
# Check cache exists and you have access
cachix use oss-devnw If you're not getting cached builds:
# Check cache configuration
nix show-config | grep substituters
# Verify cache is accessible
nix ping-store https://oss-devnw.cachix.org