setup siblix on buzz working

This commit is contained in:
ari committed 2026-10-27 09:56:57 -04:00
1 parent 2e8529fff0
commit 0efbc5817b
8 files changed
+60 -8

No files matched your search

+1 -1
View File
@@ -1 +1 @@
/nix/store/8wpcklj1m0cp057gvc6ksvkc6znlipd5-pre-commit-config.json
/nix/store/5z8yjkavrsi0zy030pcbz60ndxy248vy-pre-commit-config.json
-1
View File
@@ -31,7 +31,6 @@ in
hostAccess = [
{ port = ports.ollama; }
{ port = ports.ds4; }
# Primary skyg-linux-tracker on this host (it consolidates the lab).
{ port = ports.tracker; }
];
lanAccess = [
+6 -1
View File
@@ -26,7 +26,12 @@ in
hostAccess = [
{ port = ports.ollama; }
];
lanAccess = [ ];
lanAccess = [
{ address = "10.0.101.3"; port = 443; }
{ address = "10.0.101.3"; port = 3000; }
{ address = "10.0.101.3"; port = 8080; }
{ address = "10.0.101.3"; port = 9102; }
];
};
# A Hermes agent in every robot.
+45 -1
View File
@@ -1,10 +1,12 @@
# sibli is ephemeral: root resets to this config on every start, so change
# things here (then rebuild the host), not inside the robot.
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
let
# The robot's own nixpkgs has no host overlay, so build it from the repo.
# Fine for the seed build; a rebuild inside the robot can't see this path.
buzz-cli = pkgs.callPackage ../../../../pkgs/buzz-cli { };
# Buzz profile name: the Hermes name the host passes to the gateway.
buzzName = config.services.hermes-agent.environment.API_SERVER_MODEL_NAME or "sibli";
in
{
# The user has no password; ssh keys only.
@@ -37,6 +39,48 @@ in
# Hermes's Buzz platform runs `buzz`; the service PATH has no system packages.
services.hermes-agent.environment.BUZZ_CLI_PATH = "${buzz-cli}/bin/buzz";
# A new Buzz key has no profile, and Hermes won't connect without one.
# Publish one at start if missing; the relay keeps it across resets.
systemd.services.buzz-profile = {
description = "Publish the Buzz profile if missing";
wantedBy = [ "multi-user.target" ];
before = [ "hermes-agent.service" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
path = [ buzz-cli pkgs.jq ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
User = "hermes";
# Same secrets as Hermes (container credentials from the host).
EnvironmentFile = config.systemd.services.hermes-agent.serviceConfig.EnvironmentFile;
};
script = ''
if [ -z "''${BUZZ_PRIVATE_KEY:-}" ] || [ -z "''${BUZZ_RELAY_URL:-}" ]; then
echo "No Buzz creds, skipping."
exit 0
fi
# Retry: the relay may not be reachable yet. Failure is not fatal.
for _ in 1 2 3 4 5; do
n=""
if out=$(buzz users get); then
n=$(jq 'length' <<<"$out") || n=""
fi
if [ "$n" = "0" ]; then
if buzz users set-profile --name ${lib.escapeShellArg buzzName}; then
echo "Published Buzz profile."
exit 0
fi
elif [ -n "$n" ]; then
echo "Buzz profile exists."
exit 0
fi
sleep 5
done
echo "Could not check or publish the Buzz profile." >&2
'';
};
# Docker + compose. Needs allowDocker = true on the host.
virtualisation.docker.enable = true;
users.users.ari.extraGroups = [ "docker" ];
+5 -1
View File
@@ -173,13 +173,17 @@ Each robot gets its own Buzz (Nostr) identity in its own `robots-<name>` secret:
limits it, `--restricted` allows no one.
2. Add the printed npub to the relay: `sudo buzz-manage add-member <npub>` on
hl-minipc1.
3. The robot needs `lanAccess` to the relay and the `buzz` CLI. The robot's
3. The robot needs `lanAccess` to the relay (`10.0.101.3` ports 443, 3000,
8080, 9102; the default relay URL uses 443) and the `buzz` CLI. The robot's
nixpkgs has no host overlay, so its config builds it with
`pkgs.callPackage <repo>/pkgs/buzz-cli { }` and points `BUZZ_CLI_PATH` at it
(`services.hermes-agent.environment`), because the service PATH has no
system packages. That relative path only resolves for the host's seed
build, not for a rebuild inside the robot. Restart the robot after the
secret changes.
4. A new key has no profile, and Hermes won't connect without one
(`buzz users get returned no profile`). sibli runs a `buzz-profile`
oneshot at start that calls `buzz users set-profile` when the key has none.
## Docker and Tailscale (opt-in, host side only)
+1 -1
View File
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
};
# The workspace has git deps in [patch.crates-io]; cargoHash covers them.
cargoHash = "sha256-UQ8qNqoeDwkwhmVZebi++gb2GP61dr1Zv2QU9mJ6KJ8=";
cargoHash = lib.fakeHash;
# Only this crate; the workspace has 30+ others (relay, db, ...).
cargoBuildFlags = [ "-p" "buzz-cli" ];
+2 -2
View File
@@ -29,7 +29,7 @@
let
pname = "delta-editor";
version = "0.20.1";
version = "0.21.0";
apiUrl = "https://delta.dev/api/releases/nightly/${version}/asset?asset=delta&os=linux&arch=x86_64";
@@ -38,7 +38,7 @@ let
inherit version;
outputHashMode = "flat";
outputHash = "sha256-97/XaIOQo5ni077fRErzfN2IK5jh5PjxFE1vK5Z7Oco=";
outputHash = "sha256-lN5oSycdw1n3AswiGcsB4/jR481noJ5zv3qay5CTXso=";
nativeBuildInputs = [ curl jq cacert ];
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
Binary file not shown.