{"id":46183796,"url":"https://github.com/zimbatm/iroh-nix","last_synced_at":"2026-03-07T01:00:23.168Z","repository":{"id":341423195,"uuid":"1169559277","full_name":"zimbatm/iroh-nix","owner":"zimbatm","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-03T13:36:51.000Z","size":242,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-05T02:51:43.313Z","etag":null,"topics":["buildbot-numtide"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zimbatm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-28T21:39:43.000Z","updated_at":"2026-03-04T14:53:36.000Z","dependencies_parsed_at":"2026-03-04T23:00:45.524Z","dependency_job_id":null,"html_url":"https://github.com/zimbatm/iroh-nix","commit_stats":null,"previous_names":["zimbatm/iroh-nix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zimbatm/iroh-nix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Firoh-nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Firoh-nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Firoh-nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Firoh-nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zimbatm","download_url":"https://codeload.github.com/zimbatm/iroh-nix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Firoh-nix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["buildbot-numtide"],"created_at":"2026-03-02T21:45:51.227Z","updated_at":"2026-03-06T00:01:21.755Z","avatar_url":"https://github.com/zimbatm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iroh-nix\n\nDistributed Nix build system using [iroh](https://iroh.computer/) for P2P artifact distribution.\n\n## Why\n\nSharing Nix build artifacts between machines is harder than it should be.\nThe official binary cache (cache.nixos.org) only serves what Hydra has built.\nFor everything else -- custom packages, private builds, CI outputs -- you\neither stand up your own cache (S3, Cachix, attic) or rebuild from source on\nevery machine. Distributed builds exist but require SSH access, manual\n`builders` configuration, and a central coordinator.\n\niroh-nix takes a different approach: machines discover each other over a gossip\nnetwork and exchange store paths directly, peer-to-peer. No central server, no\ncloud storage, no SSH keys to distribute. Start a daemon on each machine, join\nthe same network name, and they share artifacts automatically. Builders pull\nwork from requesters instead of having jobs pushed to them, so the system\nscales naturally without coordination.\n\n## Features\n\n- **P2P distribution** -- transfer Nix artifacts directly between machines\n- **Distributed builds** -- queue derivations and let remote builders execute them (pull-based)\n- **Gossip discovery** -- nodes announce what they have and find providers automatically\n- **HTTP binary cache** -- serve as a Nix substituter, compatible with the standard `nix` CLI\n- **Dual content addressing** -- BLAKE3 for fast internal lookups, SHA256 for Nix compatibility\n- **Replica-aware GC** -- check the network for copies before deleting local artifacts\n\n## Quick start\n\n### Install\n\nWith Nix:\n\n```bash\nnix run github:n0-computer/iroh-nix\n```\n\nOr build from source:\n\n```bash\nnix build\n./result/bin/iroh-nix --help\n```\n\n### Usage\n\nStart a node and share a store path:\n\n```bash\n# Start the daemon with gossip enabled\niroh-nix --network my-cluster daemon \u0026\n\n# Index a local store path\niroh-nix add /nix/store/abc123-hello\n\n# On another machine, fetch it\niroh-nix --network my-cluster fetch --hash \u003cblake3-hash\u003e\n```\n\nRun distributed builds:\n\n```bash\n# On the requester (has derivations to build)\niroh-nix --network my-cluster build-push /nix/store/xyz.drv\n\n# On builders (execute builds)\niroh-nix --network my-cluster builder --features x86_64-linux,kvm\n```\n\n### NixOS module\n\n```nix\n{\n  imports = [ iroh-nix.nixosModules.default ];\n\n  services.iroh-nix = {\n    daemon.enable = true;\n    builder.enable = true;\n    substituter.enable = true;\n    network = \"my-cluster\";\n  };\n}\n```\n\n## How it works\n\n```\n+----------------+          gossip          +----------------+\n|    Node A      |\u003c------------------------\u003e|    Node B      |\n|  (requester)   |                          |   (builder)    |\n+-------+--------+                          +--------+-------+\n        |                                            |\n        |  1. announce NeedBuilder                   |\n        |\u003c-------------------------------------------|\n        |  2. builder connects                       |\n        |\u003c-------------------------------------------|\n        |  3. pull job                               |\n        |-------------------------------------------\u003e|\n        |  4. fetch inputs (NAR)                     |\n        |\u003c-------------------------------------------|\n        |  5. nix-store --realise                    |\n        |                                            |\n        |  6. complete with outputs                  |\n        |\u003c-------------------------------------------|\n        |  7. fetch outputs (NAR)                    |\n        |-------------------------------------------\u003e|\n```\n\nBuilders pull work from requesters, fetch input NARs over direct QUIC\nconnections, execute `nix-store --realise`, and stream the outputs back.\nNAR data is generated on-demand (not stored as blobs), keeping storage\nrequirements low.\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [Quick start](docs/QUICKSTART.md) | Installation and first steps |\n| [Commands](docs/COMMANDS.md) | CLI reference |\n| [Architecture](docs/ARCHITECTURE.md) | System design and components |\n| [Protocols](docs/PROTOCOLS.md) | Wire protocols and message formats |\n| [Build system](docs/BUILD-SYSTEM.md) | Distributed build internals |\n| [Contributing](docs/CONTRIBUTING.md) | Developer guide |\n\n## Status\n\n**This is a proof of concept.** The code is not ready for use or review. Protocols, APIs, and the overall architecture are subject to complete rewrite.\n\n## License\n\nMIT OR Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimbatm%2Firoh-nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzimbatm%2Firoh-nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimbatm%2Firoh-nix/lists"}