1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-15 17:50:57 +00:00
Multi-tenant Nix Binary Cache
Find a file
2023-01-29 12:01:54 -07:00
.cargo Initial public commit 2022-12-31 17:01:07 -07:00
.github .github: Fix nix-installer action 2023-01-15 00:00:11 -07:00
attic server: Use the same read_chunk_async implementation 2023-01-29 12:01:54 -07:00
book book/faqs: .narinfo with missing chunks longer returns 503 2023-01-26 23:17:45 -07:00
client Use common constant for X-Attic-Nar-Info header 2023-01-29 12:01:54 -07:00
integration-tests integration-tests/basic: Increase initial timeout even more 2023-01-15 14:48:26 -07:00
nixos config.rs: Add env variable for db url 2023-01-15 18:38:28 +01:00
server server: Use the same read_chunk_async implementation 2023-01-29 12:01:54 -07:00
token Migrate to jwt-simple 2023-01-08 00:57:22 -07:00
.editorconfig Initial public commit 2022-12-31 17:01:07 -07:00
.envrc Initial public commit 2022-12-31 17:01:07 -07:00
.gitignore Initial public commit 2022-12-31 17:01:07 -07:00
Cargo.lock client: Use system certificate store 2023-01-22 11:25:10 +01:00
Cargo.toml Refactor token into a separate crate 2023-01-08 00:57:22 -07:00
ci-installer.nix Add installer script for CI environments 2023-01-02 23:29:09 -07:00
crane.nix crane.nix: Add meta 2023-01-08 23:00:53 -07:00
default.nix Initial public commit 2022-12-31 17:01:07 -07:00
flake-compat.nix Initial public commit 2022-12-31 17:01:07 -07:00
flake.lock flake.nix: Also run integration tests on stable nixpkgs 2023-01-16 14:14:14 -07:00
flake.nix flake.nix: Also run integration tests on stable nixpkgs 2023-01-16 14:14:14 -07:00
garnix.yaml Add garnix config 2023-01-06 00:59:38 -07:00
LICENSE Initial public commit 2022-12-31 17:01:07 -07:00
package.nix package.nix: Use cargoLock 2023-01-14 23:55:10 -07:00
README.md Fix typo in readme 2023-01-23 18:16:37 +01:00
shell.nix Initial public commit 2022-12-31 17:01:07 -07:00

Attic

Attic is a self-hostable Nix Binary Cache server backed by an S3-compatible storage provider. It has support for global deduplication and garbage collection.

Attic is an early prototype.

⚙️ Pushing 5 paths to "demo" on "local" (566 already cached, 2001 in upstream)...
✅ gnvi1x7r8kl3clzx0d266wi82fgyzidv-steam-run-fhs (29.69 MiB/s)
✅ rw7bx7ak2p02ljm3z4hhpkjlr8rzg6xz-steam-fhs (30.56 MiB/s)
✅ y92f9y7qhkpcvrqhzvf6k40j6iaxddq8-0p36ammvgyr55q9w75845kw4fw1c65ln-source (19.96 MiB/s)
🕒 vscode-1.74.2        ███████████████████████████████████████  345.66 MiB (41.32 MiB/s)
🕓 zoom-5.12.9.367      ███████████████████████████              329.36 MiB (39.47 MiB/s)

Try it out (15 minutes)

Let's spin up Attic in just 15 minutes. And yes, it works on macOS too!

Goals

  • Multi-Tenancy: Create a private cache for yourself, and one for friends and co-workers. Tenants are mutually untrusting and cannot pollute the views of other caches.
  • Global Deduplication: Individual caches (tenants) are simply restricted views of the content-addressed NAR Store and Chunk Store. When paths are uploaded, a mapping is created to grant the local cache access to the global NAR.
  • Managed Signing: Signing is done on-the-fly by the server when store paths are fetched. The user pushing store paths does not have access to the signing key.
  • Scalabilty: Attic can be easily replicated. It's designed to be deployed to serverless platforms like fly.io but also works nicely in a single-machine setup.
  • Garbage Collection: Unused store paths can be garbage-collected in an LRU manner.

Licensing

Attic is available under the Apache License, Version 2.0. See LICENSE for details.

By contributing to the project, you agree to license your work under the aforementioned license.