Extensibility of protocol for custom payloads across build/copy/apply sequence #29

Open
opened 2025-11-10 02:58:46 +00:00 by raito · 1 comment
Owner

Custom activation relies essentially on build/copy/apply as a sequence.

Certain servers might have more than a toplevel to build and pass around, e.g. closure info or a new Nix binary.
Copy closure might need to copy that path additionally.
Apply might need to refer to it to call it.

How do we enable these operations?

Custom activation relies essentially on build/copy/apply as a sequence. Certain servers might have more than a toplevel to build and pass around, e.g. closure info or a new Nix binary. Copy closure might need to copy that path additionally. Apply might need to refer to it to call it. How do we enable these operations?
Owner

I think we could extend the protocol by adding a context / state field (a bit like axum with their State thing).

However I see a potential drawback: if this solution is adopted, I fear that arcana will be to generic / customisable to be truly usable (i.e. if arcana is too generic, to support a new system type, we would have to create an arcana-like ~from scratch (except for the CLI)), but idk the actual impact would be.

Another potential solution would be to allow (by extending the protocol) building / copying multiple closures.
It should be possible by changing this field

string derivation = 2;

and this field

from a string to an array of strings. (and maybe the same for apply_request)

I think we could extend the protocol by adding a `context` / `state` field (a bit like axum with their `State` thing). However I see a potential drawback: if this solution is adopted, I fear that arcana will be to generic / customisable to be truly usable (i.e. if arcana is too generic, to support a new system type, we would have to create an arcana-like ~from scratch (except for the CLI)), but idk the actual impact would be. Another potential solution would be to allow (by extending the protocol) building / copying multiple closures. It should be possible by changing this field https://git.afnix.fr/arcana/arcana/src/commit/387cfca713f7b795beb26f24d93d3162c8552d52/arcana-proto/activation/build_request.proto#L8 and this field https://git.afnix.fr/arcana/arcana/src/commit/387cfca713f7b795beb26f24d93d3162c8552d52/arcana-proto/activation/copy_closure_request.proto#L8 from a string to an array of strings. (and maybe the same for apply_request)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
arcana/arcana#29
No description provided.