Nix flakes on the AT protocol
3

Configure Feed

Select the types of activity you want to include in your feed.

nix-atproto / README.md
1.6 kB 22 lines
1# Nix on the AT protocol 2 3> _This is still very WIP._ 4 5The idea for this project originally started with wanting to have nix flakes be entirely inside AT protocol infrastructure.[^1] Your flake's metadata lives inside your own repo on your PDS as a record of the following lexicon: [`space.stau.nix.release`](at://did:plc:6n2ngs7zpcpwxz3jaoxj56tu/com.atproto.lexicon.schema/space.stau.nix.release). 6 7## Status 8 9Currently, Nix infrastructure is missing a fetcher that is able to resolve AT URIs. This is not surprising considering they have not had any use to do this before. A fetcher is needed in order to be able to declare an AT URI as an input for a flake. 10 11As of now, you can publish flakes to your repo and you can build flakes directly from an AT URI. The closest you can get to being able to use an AT URI to fetch a git input would be to resolve the AT URI, getting the `source` and `rev` from your repo and putting that together in order to create a URL that Nix accepts and is able to fetch. 12 13## Usage 14 15```sh 16nixat build at://did:your:didHere/space.stau.nix.release/v1.0.0 17nixat publish path/to/flake/ v3.1.4 18``` 19 20## Building 21 22[^1]: This is technically, but not feasible long-term. You can upload blobs of source code to your PDS, but these blobs are usually capped by a max size. The closest one can get to emulating this is similar to what Tangled does: [knots](https://tangled.org/tangled.org/core/blob/76c5ddbbfcaadad93af42530d706cf0aaea52b82/docs/knot-hosting.md). This means that the source code for the flake lives inside a knot while the rest of the project lives inside your actual PDS.