No description
Find a file
2025-08-30 09:37:13 +00:00
doc lost docs 2025-07-22 10:46:33 +01:00
junk lost junk 2025-07-22 10:48:21 +01:00
schemas Nix global settings access 2025-08-30 09:37:13 +00:00
src Nix global settings access 2025-08-30 09:37:13 +00:00
tests lost tests 2025-07-22 10:46:23 +01:00
.gitignore Nix/Tup build system refactor 2024-12-12 12:30:23 +00:00
default.nix Nix global settings access 2025-08-30 09:37:13 +00:00
nix-actor.sh lost script 2025-07-22 10:49:42 +01:00
nix_actor.nimble *.nimble: swap nim:bin key and value 2024-09-30 16:44:28 +01:00
NOTES.md lost notes 2025-07-22 10:49:04 +01:00
README.md Add reactive-nix.md 2024-09-30 13:26:37 +01:00
sbom.json Nix global settings access 2025-08-30 09:37:13 +00:00
service.pr.in Add cfg output to default.nix 2024-07-04 15:39:26 +03:00
test.nix lost tests 2025-07-22 10:46:23 +01:00
Tupfile Nix/Tup build system refactor 2024-12-12 12:30:23 +00:00
Tuprules.jq Replace protocol, update dependencies 2024-06-24 12:04:15 +03:00
Tuprules.tup Nix/Tup build system refactor 2024-12-12 12:30:23 +00:00

Syndicated Nix Actor

An actor for interacting with the Nix daemon via the Syndicated Actor Model.

See protocol.prs for the Syndicate protocol schema.

Documentation articles

Evaluation state as entity capabililties

The actor exposes on its initial capability a gatekeeper that resolves requests in the form <nix { lookupPath: [ … ], store: … } >.

The resolved entity is an evaluation state that responds to the assertions <eval @expr string @args any @result #:Result> as well as observation of literal values via the dataspace protocol. The evaluation state is initialized with the value nil and is advanced with Nix functions in the form of prev: args: body with a type of Any -> Any -> Any.

To evaluate the hello package from Nixpkgs one could use an assertion like <eval "_: pkgName: builtins.getAttr pkgName (import <nixpkgs> {})" "hello" #:…> which would assert back a new assertion state at hello.

The evaluation state represents a lazy Nix expression and must be "realised" to become a physical store path. Asserting <realise-string @result #:Result> to an evaluation state will return a string with its realized closure at the evaluation store.

With the exception of observations the result value of <ok @value any> or <error @message any> is used for response assertions.

Dataspace observations work over evaluation state. In the example case of an evaluation state positioned at the hello package the observation of { hello: { meta: { license: { shortName: ? } } } } would capture the value "gpl3Plus". If an attrset contains an outPath attribute then the value of outPath is captured in place of the attrset. This is to avoid traversing deeply nested and recursive Nix values.

Store replication

Nix stores can be opened using the gatekeeper step <nix-store { storeUri: "…" }>. The store entity responds to <check-path @store-path string @result #:any> with true or false.

To replicate paths between two stores, assert <replicate @target #:any @storePath string @result #:Result> to a store entity or a evaluation entity, with target set to a store entity or a evaluation entity.

Worker protocol

The was once an abstraction of the Nix worker socket that could intermediate between clients and the worker but that code has been removed, refer to git history for that.