{"id":24993825,"url":"https://github.com/nexveridian/attic-compose","last_synced_at":"2025-07-24T20:12:42.964Z","repository":{"id":275672794,"uuid":"926824340","full_name":"NexVeridian/attic-compose","owner":"NexVeridian","description":"Deploying Attic Nix Binary Cache With Docker Compose","archived":false,"fork":false,"pushed_at":"2025-03-28T22:57:59.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T23:29:45.071Z","etag":null,"topics":["attic","binary-cache","cache","ci","ci-cd","github-actions","nix","nix-flake","nixos"],"latest_commit_sha":null,"homepage":"","language":"Just","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NexVeridian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-Apache","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-03T23:15:32.000Z","updated_at":"2025-03-28T22:58:03.000Z","dependencies_parsed_at":"2025-02-04T00:25:12.395Z","dependency_job_id":"26513dc7-1fc7-4f5b-bfaf-91ea6fabc175","html_url":"https://github.com/NexVeridian/attic-compose","commit_stats":null,"previous_names":["nexveridian/attic-compose"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexVeridian%2Fattic-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexVeridian%2Fattic-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexVeridian%2Fattic-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexVeridian%2Fattic-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NexVeridian","download_url":"https://codeload.github.com/NexVeridian/attic-compose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246188673,"owners_count":20737745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attic","binary-cache","cache","ci","ci-cd","github-actions","nix","nix-flake","nixos"],"created_at":"2025-02-04T14:28:18.260Z","updated_at":"2025-03-29T13:24:29.073Z","avatar_url":"https://github.com/NexVeridian.png","language":"Just","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Attic Compose\nDeploying Attic Nix Binary Cache With Docker Compose\n\n## Server Install\nInstall docker and docker compose\n\n`git clone`\n\nSee [/scr](./src), create a `prod.env` and `server.toml` files\n\nthen run\n\n```bash\njust up\njust create_token \u003cyour username here\u003e\n```\n\n### Exmaple Traefik Label\n```yaml\nlabels:\n  - \"traefik.enable=true\"\n  - \"traefik.http.routers.attic.rule=Host(`nix.example.com`)\"\n  - \"traefik.http.routers.attic.entrypoints=websecure\"\n  - \"traefik.http.routers.attic.tls.certresolver=myhttpchallenge\"\n  - \"traefik.http.services.attic.loadbalancer.server.port=8080\"\n  - \"traefik.http.routers.attic-http.middlewares=redirect-to-https\"\n  - \"traefik.docker.network=\u003cnetwork name\u003e\"\n```\n\n### Cloudflare\nIf you are using cloudflare make the subdomain DNS only\n\n### Check if it works\nIf working nix.example.com should say `attic push`\n\n## Client Install\nInstall `pkg.attic-client`\n\nmake sure your user is trusted\n```nix\nnix.settings = {\n  trusted-users = [\n    \"root\"\n    \"\u003cyour username here\u003e\"\n  ];\n};\n```\n\n```bash\n# then login to attic\nattic login \u003cpick a name for server\u003e https://nix.example.com \u003ctoken from just create_token\u003e\n\n# create a cache to push to\nattic cache create \u003ccache name\u003e\n\n# use the cache\nattic use \u003ccache name\u003e\n\n# pushing to the cache\nattic push \u003ccache name\u003e /nix/store/*/\n```\n\n## Github Actions Install\nAdd the token from `just create_token` to your repository secrets `https://github.com/\u003cusername\u003e/\u003crepo\u003e/settings/secrets/actions`\n```yaml\nsteps:\n  - uses: actions/checkout@v3\n  - uses: DeterminateSystems/nix-installer-action@main\n  - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client login \u003cpick a name for server\u003e https://nix.example.com ${{ secrets.ATTIC_TOKEN }} || true\n  - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client cache create \u003ccache name\u003e || true\n  - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client use \u003ccache name\u003e || true\n\n  - run: nix flake check --all-systems\n\n  - run: |\n      for i in {1..5}; do\n        nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client push \u003ccache name\u003e /nix/store/*/ \u0026\u0026 break || [ $i -eq 5 ] || sleep 5\n      done\n  - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client push \u003ccache name\u003e /nix/store/*/ || true\n```\n\n# License\nAll code in this repository is dual-licensed under either [License-MIT](./LICENSE-MIT) or [LICENSE-APACHE](./LICENSE-Apache) at your option. This means you can select the license you prefer. [Why dual license](https://github.com/bevyengine/bevy/issues/2373).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexveridian%2Fattic-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexveridian%2Fattic-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexveridian%2Fattic-compose/lists"}