From 93f9309c91a63b2a4f0ed7812a097a606e61ae54 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Thu, 19 Nov 2026 21:35:55 +0000 Subject: [PATCH] nixos/castle: Use slop-broker over SSH `castle` gets a requester and an approver key for `palace`'s broker, set up with `programs.slop`, to try the SSH transport. `palace` lets the keys in as the requester `castle`, sharing `slop-cannon`'s `agent` policy, and the approver `castle`. Co-Authored-By: Claude Opus 5.5 --- docs/sites/home/palace.md | 6 ++++-- docs/slop-broker.md | 9 ++++++++- nixos/boxes/home/castle/default.nix | 13 +++++++++++++ nixos/boxes/home/palace/slop-broker.nix | 11 +++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/docs/sites/home/palace.md b/docs/sites/home/palace.md index ffa3874..5af83bf 100644 --- a/docs/sites/home/palace.md +++ b/docs/sites/home/palace.md @@ -215,8 +215,10 @@ the agents on `slop-cannon` after policy and, usually, a human approve them. `palace/slop-broker-oidc-secret`); its sessions, push subscriptions and push signing key are in `/var/lib/slop-broker/web`. Deploys to the routers need a fresh passkey there. - Requesters and approvers on other boxes log in over SSH as `slop`, whose keys can only run the - broker's forced command (see the - [design](https://git.nul.ie/dev/slop-broker/src/branch/main/docs/design.md#other-requesters-and-approvers)). + broker's forced command (see + [Other requesters and approvers](../../slop-broker.md#other-requesters-and-approvers)). The + agents on `castle` are the requester `castle`, with the same policy as `slop-cannon`, and + `castle` also has an approver key (`sshApprovers.castle`). ## Notable config files diff --git a/docs/slop-broker.md b/docs/slop-broker.md index 57cc7a2..ae265ae 100644 --- a/docs/slop-broker.md +++ b/docs/slop-broker.md @@ -16,6 +16,7 @@ it; for how it works, read the repository's |---|---| | [`palace`](sites/home/palace.md) | Runs the broker, its builder and the approvals web app's listener; holds the deploy key | | [`slop-cannon`](sites/home/slop-cannon.md) | The agents' VM; reaches the broker over vsock | +| [`castle`](sites/home/castle.md) | Agents there are a requester over SSH; Dev also approves from it over SSH | | [`object`](sites/colony/shill/containers/object.md) | The binary cache that `slop build` pushes to | | [`middleman`](sites/colony/shill/containers/middleman.md) | Publishes the approvals web app at `approve.slop.nul.ie`, Pocket ID at `id.nul.ie` and Paseo's web app at `slop.nul.ie` | @@ -42,6 +43,12 @@ target once it's merged. `.keys/slop-request.key` over SSH when that file exists; an approver key never goes in `.keys/`, because agents can read the checkout. +## Other requesters and approvers + +`castle` uses [`programs.slop`](https://git.nul.ie/dev/slop-broker/src/branch/main/docs/design.md#other-requesters-and-approvers): +its agents are the requester `castle` (same policy as `slop-cannon`), and Dev's approver key is +`sshApprovers.castle`. Both log in to `palace` as `slop`. + ## Binary cache `slop build` pushes into Harmonia's store on `object` as `harmonia`, whose broker key is limited to @@ -73,7 +80,7 @@ for simplicity. Each step updates this page, the box pages and `AGENTS.md` as it lands. 1. **Done:** `slop.nul.ie`; the broker core, box queries, SSH transport, deploys and builds on - `palace`; Pocket ID at `id.nul.ie`. + `palace`; `castle` over SSH; Pocket ID at `id.nul.ie`. 2. **Approvals web app:** remove the temporary `http://localhost:8095/auth/callback` from the `slop-approve` client, deploy `palace` and `middleman`. 3. **Secrets:** the broker's age identity joins `.keys/dev.pub` in the recipients that diff --git a/nixos/boxes/home/castle/default.nix b/nixos/boxes/home/castle/default.nix index fe1ec6d..adb153e 100644 --- a/nixos/boxes/home/castle/default.nix +++ b/nixos/boxes/home/castle/default.nix @@ -241,6 +241,19 @@ in claude-code = { enable = true; }; + + # Try `slop-broker` from here; both keys are generated locally + slop = { + host = "palace.${domain}"; + request = { + enable = true; + keyFile = "~/.ssh/slop-castle-request"; + }; + approve = { + enable = true; + keyFile = "~/.ssh/slop-castle-approve"; + }; + }; }; services = { diff --git a/nixos/boxes/home/palace/slop-broker.nix b/nixos/boxes/home/palace/slop-broker.nix index 6bea05d..0e6b3e7 100644 --- a/nixos/boxes/home/palace/slop-broker.nix +++ b/nixos/boxes/home/palace/slop-broker.nix @@ -113,6 +113,17 @@ policy = "agent"; }; + # Agents on `castle` connecting over SSH + requesters.castle = { + sshKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINY4Znri43VCA0gJYBbO9g72OsN3xnMYbMZ79G5tAZnr slop requester (castle)" + ]; + policy = "agent"; + }; + + # Answering requests from `castle` over SSH + sshApprovers.castle = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnv2y4uuABxHtk2iXhKe67W8jRIJcLrDVt9/LQaG14l slop approver (castle)" ]; + ssh = { enable = true; keyFile = config.age.secrets."palace/slop-broker-deploy.key".path;