{"id":15171868,"url":"https://github.com/zombiezen/setup-nix-cache-action","last_synced_at":"2025-06-15T11:32:28.897Z","repository":{"id":37082984,"uuid":"445369688","full_name":"zombiezen/setup-nix-cache-action","owner":"zombiezen","description":"GitHub Action that configures Nix to read/write to a cache","archived":false,"fork":false,"pushed_at":"2024-09-23T16:00:09.000Z","size":1624,"stargazers_count":15,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-31T12:51:21.982Z","etag":null,"topics":["build-cache","github-actions","nix","nixpkgs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zombiezen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"zombiezen"}},"created_at":"2022-01-07T02:08:59.000Z","updated_at":"2025-01-07T14:31:41.000Z","dependencies_parsed_at":"2024-05-16T18:33:32.747Z","dependency_job_id":"41db7362-f74d-46e5-b4ae-80ca3239fd55","html_url":"https://github.com/zombiezen/setup-nix-cache-action","commit_stats":{"total_commits":52,"total_committers":2,"mean_commits":26.0,"dds":"0.11538461538461542","last_synced_commit":"a5181b4a6f04912ada3cf95e09eec85d92b41a29"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fsetup-nix-cache-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fsetup-nix-cache-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fsetup-nix-cache-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fsetup-nix-cache-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zombiezen","download_url":"https://codeload.github.com/zombiezen/setup-nix-cache-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238229940,"owners_count":19437723,"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":["build-cache","github-actions","nix","nixpkgs"],"created_at":"2024-09-27T09:20:57.691Z","updated_at":"2025-02-11T03:31:10.035Z","avatar_url":"https://github.com/zombiezen.png","language":"TypeScript","funding_links":["https://github.com/sponsors/zombiezen"],"categories":[],"sub_categories":[],"readme":"# Set up Nix Cache Action\n\nThis is a [GitHub Action][] that configures the [Nix][] package manager\nto read from (and optionally write to)\na remote cache.\n\n[GitHub Action]: https://docs.github.com/en/actions\n[Nix]: https://nixos.org/\n\n## Usage\n\nUsing an [Amazon Web Services S3][] bucket for loading and storing:\n\n```yaml\nname: Build\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n    - name: Check out code\n      uses: actions/checkout@v4\n    - name: Install Nix\n      uses: cachix/install-nix-action@v23\n    - name: Set up cache\n      uses: zombiezen/setup-nix-cache-action@v0.4.0\n      with:\n        substituters: s3://example-bucket\n        secret_keys: ${{ secrets.NIX_PRIVATE_KEY }}\n        aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n        aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n    - name: Build\n      run: nix-build\n```\n\nUsing a [Google Cloud Storage][] bucket for loading and storing:\n\n```yaml\nname: Build\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n    - name: Check out code\n      uses: actions/checkout@v4\n    - name: Install Nix\n      uses: cachix/install-nix-action@v23\n    - name: Authenticate to Google Cloud Platform\n      # See https://github.com/google-github-actions/auth/blob/main/README.md\n      # for details on how to set up.\n      uses: google-github-actions/auth@v1\n    - name: Set up cache\n      uses: zombiezen/setup-nix-cache-action@v0.4.0\n      with:\n        substituters: gs://example-bucket\n        secret_keys: ${{ secrets.NIX_PRIVATE_KEY }}\n        use_nixcached: true\n    - name: Build\n      run: nix-build\n```\n\nThe example above uses [nixcached][] to connect to Google Cloud Storage\nusing normal service account credentials.\nIf you prefer to avoid the dependency, you can instead use the [interoperability endpoint][],\nbut you will have to generate an HMAC key:\n\n```yaml\n# Connecting to GCS without nixcached (not recommended).\n\nname: Build\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n    - name: Check out code\n      uses: actions/checkout@v4\n    - name: Install Nix\n      uses: cachix/install-nix-action@v23\n    - name: Set up cache\n      uses: zombiezen/setup-nix-cache-action@v0.4.0\n      with:\n        substituters: s3://example-bucket?endpoint=https://storage.googleapis.com\n        secret_keys: ${{ secrets.NIX_PRIVATE_KEY }}\n        aws_access_key_id: ${{ secrets.GCS_HMAC_ACCESS_ID }}\n        aws_secret_access_key: ${{ secrets.GCS_HMAC_SECRET_ACCESS_KEY }}\n    - name: Build\n      run: nix-build\n```\n\n[Amazon Web Services S3]: https://aws.amazon.com/s3/\n[Google Cloud Storage]: https://cloud.google.com/storage\n[interoperability endpoint]: https://cloud.google.com/storage/docs/interoperability\n[nixcached]: https://github.com/zombiezen/nixcached\n\n## Inputs\n\n### `substituters`\n\n(Required) One or more space-separated cache URLs (typically starts with `s3://`)\n\n### `trusted_public_keys`\n\nSpace-separated trusted keys for signed downloads.\nNot required if a private key is given.\n\n### `secret_keys`\n\nPrivate keys for signing built artifacts.\nIf provided, built derivations will be uploaded to the first substituter.\n\n### `aws_access_key_id`\n\nAccess key ID for downloading and uploading artifacts\n\n### `aws_secret_access_key`\n\nSecret access key for downloading and uploading artifacts\n\n### `use_nixcached`\n\nIf `true`, use [nixcached][] for uploading and downloading.\nThis permits concurrent uploading and more straightforward authentication.\n\n### `nixcached_upload_options`\n\nAdditional arguments to send to `nixcached upload`.\nPOSIX-shell-style quoting is supported.\n\n## License\n\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzombiezen%2Fsetup-nix-cache-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzombiezen%2Fsetup-nix-cache-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzombiezen%2Fsetup-nix-cache-action/lists"}