Builds from the flake show the commit they are from in the version,
like `0.3.0+2d59b59`, or `0.3.0+2d59b59-dirty` with uncommitted
changes. It shows in the web app, in `--version`, which `slop` and
`slop-broker` now take, and in the error for an old protocol.
The commit is part of the build, so every commit rebuilds the package.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every push runs `nix flake check`: the package with its tests, new
`clippy` (warnings as errors) and `fmt` checks, and the VM test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A setup for trying the broker by hand, laid out like a deployment.
`devenv up` runs the broker from the checkout with its web app, Pocket
ID for approvers to sign in with, and a box VM for the SSH targets; a
setup task creates the approver, their group and the broker's OIDC
client through Pocket ID's API. `demo` boots the agents' VM on the
terminal, which reaches the broker only over vsock.
Approvers use `slop-approve` in the devenv shell, or the web app after
signing in with a link from `demo-sign-in`, so passkey approvals can
be tried without deploying anything.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`slop build <attr>…` builds flake attributes of a pushed commit on the
builder and, once approved, copies them to a binary cache's store and
roots them there. `services.slop-broker-cache` gives the cache store
owner's key a forced command that only allows the store protocol and
GC roots, and expires the roots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`slop deploy <node>…` builds a pushed commit and, once approved,
activates it on every target at once. A builder, reached over SSH as
a user that only holds a read-only Git key, fetches the commit from
the Git server and evaluates and builds the deploy-rs profiles, so
agent-written Nix never runs in the broker. Before asking, the broker
copies the closures to the nodes and compares them there with a fixed
read-only script: package changes from `nix store diff-closures`, and
changed units and `/etc` files from the two `etc` trees.
Once approved, `activate-rs` runs on each node in a transient unit,
so it finishes even if the connection drops or the broker restarts.
Policy rules see one scope per target, and the strictest answer
applies. `services.slop-broker-builder` sets up the builder on any box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Requesters and approvers on other boxes log in to the broker's box as
`slop`. Each key has a forced `slop-broker remote <role> <name>`, which
joins the session to the broker through a socket only `slop` can open,
so the broker trusts the name like it trusts a vsock CID. A key does
one job: the module refuses a key used for both roles.
`slop` and `slop-approve` take `ssh:<destination>` addresses, from
`SLOP_BROKER` and `SLOP_APPROVE` or else `~/.config/slop/config.toml`,
and an approver connection now carries many requests. The
`programs.slop` home-manager module installs both clients, a `Host`
entry per key and that config file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`slop-broker` runs privileged operations for coding agents under named
policies (auto, ask or deny per operation), which requesters can share,
with approvals from `slop-approve` or Home Assistant notifications and
optional leases. The broker and the `slop` client talk over vsock, so
a VM needs no network path to it. Messages are typed enums shared by
both, CBOR-encoded and framed with `LengthDelimitedCodec`; decoding
validates every value, and requests carry a protocol version.
The first operation is `slop ssh`. The `services.slop-broker` NixOS
module runs the broker as a hardened service from generated TOML, and
a VM test exercises it over vsock loopback. devenv provides the
development environment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>