{"id":13611062,"url":"https://github.com/juspay/cachix-push","last_synced_at":"2025-06-22T16:42:14.963Z","repository":{"id":124260634,"uuid":"608704576","full_name":"juspay/cachix-push","owner":"juspay","description":"A flake app that can push packages and devshells to cachix","archived":false,"fork":false,"pushed_at":"2024-11-04T23:45:05.000Z","size":25,"stargazers_count":22,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-05T00:25:58.034Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","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/juspay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-03-02T15:12:13.000Z","updated_at":"2024-09-11T18:41:57.000Z","dependencies_parsed_at":"2024-08-22T18:57:33.289Z","dependency_job_id":"af17209d-a661-48ab-a06f-ab69f6743041","html_url":"https://github.com/juspay/cachix-push","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fcachix-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fcachix-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fcachix-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fcachix-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juspay","download_url":"https://codeload.github.com/juspay/cachix-push/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558517,"owners_count":17165142,"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":[],"created_at":"2024-08-01T19:01:51.374Z","updated_at":"2024-11-07T17:31:19.053Z","avatar_url":"https://github.com/juspay.png","language":"Nix","funding_links":[],"categories":["Nix"],"sub_categories":[],"readme":"# cachix-push\n\nA flake app to **push and pin** multiple store paths [built by Omnix](https://omnix.page/om/ci.html) to cachix. Better than `nix build ... | cachix push ...`.\n\nWhen you pin paths, they are indexed by `system` and custom `prefix` (usually git branch). In CI, you can do this only from say `main` branch, thus having up-to-date cache for your primary branch and have it pinned.\n\n## Usage\n\nPush and pin all store paths built by [`om ci`](https://omnix.page/om/ci.html). First, run `om ci` to build outputs:\n\n```sh\n# First, build the flake.\nom ci run --results=om.json\n```\n\nThis will create a JSON like:\n\n```json\n{\n  \"systems\": [\n    \"x86_64-linux\"\n  ],\n  \"result\": {\n    \"omnix\": {\n      \"build\": {\n        \"byName\": {\n          \"treefmt-check\": \"/nix/store/x14rcm3djs4cr9d2ih0msxw8jiwdm1yn-treefmt-check\",\n          \"omnix-cli\": \"/nix/store/ci6vsd9wpd8h3mrjxf7ny4mk1ncjjprc-omnix-cli-0.1.0\",\n          \"omnix-devshell\": \"/nix/store/n4ri7biinnpwx0d5s68vgni6wjlichn1-omnix-devshell\",\n          \"rust-flake-devshell\": \"/nix/store/wcj64d5yv56bd728737rczxkdjwvfibs-rust-flake-devshell\"\n        }\n      }\n    },\n  }\n} \n```\n\n(Everything under `byName` represents the store paths of flake output indexed by their derivation name)\n\nWhich can you pass to this program to push \u0026 pin on cache:\n\n```sh\n# Push to https://mycache.cachix.org\nnix run github:juspay/cachix-push -- --cache mycache --subflake ROOT --prefix \"$(git branch --show-current)\" \u003c om.json\n```\n\nThis will output at the end what got pinned, for example:\n\n```text\n[..]\nPinning on https://om.cachix.org\nPin main-x86_64-linux-treefmt-check =\u003e /nix/store/x14rcm3djs4cr9d2ih0msxw8jiwdm1yn-treefmt-check\nPin main-x86_64-linux-omnix-cli =\u003e /nix/store/ci6vsd9wpd8h3mrjxf7ny4mk1ncjjprc-omnix-cli-0.1.0\nPin main-x86_64-linux-omnix-devshell =\u003e /nix/store/n4ri7biinnpwx0d5s68vgni6wjlichn1-omnix-devshell\nPin main-x86_64-linux-rust-flake-devshell =\u003e /nix/store/wcj64d5yv56bd728737rczxkdjwvfibs-rust-flake-devshell\n```\n\nwhich gets reflected in the cachix UI as:\n\n![image](https://github.com/user-attachments/assets/1e392d69-7f22-4c38-946b-e0725d69b1fb)\n\n## GitHub workflow example\n\n- https://github.com/juspay/omnix/pull/340\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fcachix-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuspay%2Fcachix-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fcachix-push/lists"}