Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a Nix Binary Caching Strategy #34

Open
vonjackets opened this issue Feb 24, 2025 · 0 comments
Open

Define a Nix Binary Caching Strategy #34

vonjackets opened this issue Feb 24, 2025 · 0 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@vonjackets
Copy link
Collaborator

Description

To improve build times and efficiency in CI/CD, we need to define a Nix binary caching strategy. This will involve provisioning a dedicated machine to serve as a Nix binary cache, allowing us to avoid redundant builds and speed up deployments.

Tasks

  • Evaluate Caching Options:
    • Use a remote NixOS machine with SSH - This is already mostly implemented aside from I/CaC.
    • Set up an S3-compatible binary cache using garage or minio
  • Provision a NixOS Machine for Caching:
    • Select a cloud or on-premise host for running the cache
    • Configure nix-serve or nix-store-gcs for efficient cache distribution
    • Ensure authentication and access control via nix-store --sign
  • CI/CD Integration:
    • Modify GitLab CI/CD pipelines to push built artifacts to the cache
    • Configure developers' local environments to pull from the cache
  • Security Considerations:
    • Use signed builds to prevent cache poisoning
    • Restrict cache access with authentication
    • Regularly prune unused artifacts to manage storage efficiently

Acceptance Criteria

  • A working Nix cache is deployed and accessible by CI/CD and local developers
  • CI/CD pipelines are modified to push built artifacts to the cache
  • A clear process for managing and securing cached artifacts is documented
@vonjackets vonjackets added documentation Improvements or additions to documentation good first issue Good for newcomers labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant