Author SHA1 Message Date
jackos1998 4220964ef2 home-manager/agents: Add Antigravity CLI support
Share agent instructions with Antigravity and enable it on tower,
castle and slop-cannon. Configure Paseo to reuse the agent user’s SSH
sign-in.
2026-11-29 21:14:26 +00:00
jackos1998andClaude Opus 5.5 b56ce8ff5d flake: Pin slop-broker to its progress branch
For testing slop-broker#22 on real deploys; not for merging.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:38:59 +00:00
jackos1998andClaude Opus 5.5 d95309b4d3 flake: Update slop-broker to v0.3.0
Build llm-agents / build (pull_request) Skipped
CI / Check, build and cache nixfiles (push) Successful in 29m42s
Update docs / update (push) Failing after 1m11s
Containers as targets (protocol 3, so every `slop` moves with the
broker), copying from the builder's store, and stdin no longer hiding
a disconnect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:33:41 +00:00
17 changed files with 62 additions and 200 deletions

No files matched your search

+5
View File
@@ -47,6 +47,11 @@ over Tailscale.
- Steam and Wireshark enabled; `fstrim`, LVM thin provisioning. - Steam and Wireshark enabled; `fstrim`, LVM thin provisioning.
- `nix.gc.automatic = false` — GC is run manually on the laptop. - `nix.gc.automatic = false` — GC is run manually on the laptop.
## Antigravity CLI
`my.agents.antigravity.enable` installs Google's `agy` CLI. Run it in a local checkout and
sign in with your Google account. A paid Google AI Pro or Ultra account can select Gemini 4 Neon.
## Notable config files ## Notable config files
- [`nixos/boxes/tower/default.nix`](../../nixos/boxes/tower/default.nix) — the whole box (single file). - [`nixos/boxes/tower/default.nix`](../../nixos/boxes/tower/default.nix) — the whole box (single file).
@@ -17,25 +17,6 @@ Port 8008 carries client and federation traffic with forwarded headers, while a
uses port 9000. Registration and guest access are disabled; uploads, dynamic thumbnails and URL uses port 9000. Registration and guest access are disabled; uploads, dynamic thumbnails and URL
previews are enabled, with preview fetching restricted to [middleman](middleman.md). previews are enabled, with preview fetching restricted to [middleman](middleman.md).
#### Pocket ID sign-in
Synapse offers [Pocket ID](middleman.md#pocket-id) alongside Google and password login.
`matrix-synapse` appends the Pocket ID provider to the existing provider list at startup.
The `matrix` client requires PKCE, and new account registration through it is disabled.
Deploy `middleman` to register the client before deploying `chatterbox`. For each existing
Matrix account, use Synapse's Admin API from inside `chatterbox` to link a verified Pocket ID
subject (`sub`).
1. Read the account with `GET /_synapse/admin/v2/users/<matrix-id>`.
2. Send a `PUT` for that account with the existing `external_ids` plus
`{"auth_provider":"oidc-pocket-id","external_id":"<Pocket ID subject>"}`.
Include the current `admin` value to preserve the account's administrator status.
3. Sign in through Pocket ID in a fresh Element session and verify the Matrix ID is the same.
For encrypted rooms, verify the new session or restore from the existing recovery key.
See the [Synapse User Admin API](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html#create-or-modify-account).
### Bridges ### Bridges
The box runs heisenbridge for IRC, `mautrix-whatsapp`, and two `mautrix-meta` instances for The box runs heisenbridge for IRC, `mautrix-whatsapp`, and two `mautrix-meta` instances for
@@ -116,7 +116,7 @@ all vhosts are `onlySSL`, kTLS and HTTP/2. "SSO" = gated behind [oauth2-proxy](#
| `id.nul.ie` | `localhost:1411` | Pocket ID; `/setup` only from internal networks; `X-API-Key` stripped | | `id.nul.ie` | `localhost:1411` | Pocket ID; `/setup` only from internal networks; `X-API-Key` stripped |
| `netdata-colony.nul.ie` | `<host>.ams1.int.nul.ie:19999` | netdata fan-out over `vm`, `fw`, `ctr`, `oci`, `http`, `jackflix-ctr`, `chatterbox-ctr`, `colony-psql-ctr`; **SSO** | | `netdata-colony.nul.ie` | `<host>.ams1.int.nul.ie:19999` | netdata fan-out over `vm`, `fw`, `ctr`, `oci`, `http`, `jackflix-ctr`, `chatterbox-ctr`, `colony-psql-ctr`; **SSO** |
| `pass.nul.ie` | `vaultwarden-ctr:8080` | [vaultwarden](vaultwarden.md); `/notifications/hub` proxied with websockets | | `pass.nul.ie` | `vaultwarden-ctr:8080` | [vaultwarden](vaultwarden.md); `/notifications/hub` proxied with websockets |
| `matrix.nul.ie` | `chatterbox-ctr:8008` | [chatterbox](chatterbox.md) Synapse client + federation; native Pocket ID sign-in; also listens on `:8448` as federation `default_server`; `= /` redirects to Element; serves Matrix `.well-known`s | | `matrix.nul.ie` | `chatterbox-ctr:8008` | [chatterbox](chatterbox.md) Synapse client + federation; also listens on `:8448` as federation `default_server`; `= /` redirects to Element; serves Matrix `.well-known`s |
| `element.nul.ie` | static `element-web` | Element configured for the `nul.ie` homeserver | | `element.nul.ie` | static `element-web` | Element configured for the `nul.ie` homeserver |
| `torrents.nul.ie` | `jackflix-ctr:9091` | Transmission ([jackflix](jackflix.md)); **SSO** | | `torrents.nul.ie` | `jackflix-ctr:9091` | Transmission ([jackflix](jackflix.md)); **SSO** |
| `jackett.nul.ie` | `jackflix-ctr:9117` | **SSO** | | `jackett.nul.ie` | `jackflix-ctr:9117` | **SSO** |
@@ -136,7 +136,7 @@ all vhosts are `onlySSL`, kTLS and HTTP/2. "SSO" = gated behind [oauth2-proxy](#
| `paseo-relay.nul.ie` | `localhost:4000` | Paseo relay; websockets with long timeouts; `/metrics` blocked | | `paseo-relay.nul.ie` | `localhost:4000` | Paseo relay; websockets with long timeouts; `/metrics` blocked |
| `slop.nul.ie` | static Paseo web app | falls back to `index.html`; precompressed files served as-is | | `slop.nul.ie` | static Paseo web app | falls back to `index.html`; precompressed files served as-is |
| `approve.slop.nul.ie` | `palace.h.nul.ie:8095` | [`slop-broker`](../../../../slop-broker.md#approvals-web-app)'s approvals web app, which handles sign-in itself (Pocket ID) | | `approve.slop.nul.ie` | `palace.h.nul.ie:8095` | [`slop-broker`](../../../../slop-broker.md#approvals-web-app)'s approvals web app, which handles sign-in itself (Pocket ID) |
| `md.nul.ie` | `object-ctr:3000` | [HedgeDoc](object.md#hedgedoc-sign-in); native Pocket ID sign-in; websockets | | `md.nul.ie` | `object-ctr:3000` | HedgeDoc; websockets |
| `pb.nul.ie` | `object-ctr:8088` | wastebin | | `pb.nul.ie` | `object-ctr:8088` | wastebin |
| `photos.nul.ie` | `jackflix-ctr:2342` | PhotoPrism; websockets | | `photos.nul.ie` | `jackflix-ctr:2342` | PhotoPrism; websockets |
| `pront.nul.ie` | `stream-hi.h.nul.ie:5000` | OctoPrint on the home network ([`stream`](../../../home/stream.md)); `/webcam/` → `:5050`; **SSO** | | `pront.nul.ie` | `stream-hi.h.nul.ie:5000` | OctoPrint on the home network ([`stream`](../../../home/stream.md)); `/webcam/` → `:5050`; **SSO** |
+1 -28
View File
@@ -13,7 +13,7 @@ Object storage and the Nix binary cache, plus HedgeDoc and wastebin.
| --- | --- | --- | | --- | --- | --- |
| MinIO | `9000` (S3) / `9001` (console) | S3-compatible object storage, `s3.nul.ie` + `*.s3.nul.ie` (virtual-host style via `MINIO_DOMAIN`), console at `minio.nul.ie`; region `eu-central-1`; data on the `/mnt/minio` XFS volume | | MinIO | `9000` (S3) / `9001` (console) | S3-compatible object storage, `s3.nul.ie` + `*.s3.nul.ie` (virtual-host style via `MINIO_DOMAIN`), console at `minio.nul.ie`; region `eu-central-1`; data on the `/mnt/minio` XFS volume |
| Harmonia | `5000` | Nix binary cache at `nix-cache.nul.ie` — `harmonia-dev` cache serves `shill`'s `/nix/store` out of a dedicated store view rooted at `/var/lib/harmonia` (bind-mounted from `/mnt/nix-cache`), signed with the `nix-cache.key` secret; a `harmonia` user with authorized keys exists for cache pushes, including `slop-broker`'s on `palace`, which is restricted to the store protocol and GC roots (`services.slop-broker-cache`, see [`slop-broker.md`](../../../../slop-broker.md#binary-cache)) | | Harmonia | `5000` | Nix binary cache at `nix-cache.nul.ie` — `harmonia-dev` cache serves `shill`'s `/nix/store` out of a dedicated store view rooted at `/var/lib/harmonia` (bind-mounted from `/mnt/nix-cache`), signed with the `nix-cache.key` secret; a `harmonia` user with authorized keys exists for cache pushes, including `slop-broker`'s on `palace`, which is restricted to the store protocol and GC roots (`services.slop-broker-cache`, see [`slop-broker.md`](../../../../slop-broker.md#binary-cache)) |
| HedgeDoc | `3000` | collaborative markdown notes at `md.nul.ie`; Postgres on [colony-psql](colony-psql.md); anonymous edits but no anonymous notes, email and [Pocket ID sign-in](#hedgedoc-sign-in), no open email registration | | HedgeDoc | `3000` | collaborative markdown notes at `md.nul.ie`; Postgres on [colony-psql](colony-psql.md); anonymous edits but no anonymous notes, email login, no open email registration |
| wastebin | `8088` | pastebin at `pb.nul.ie` | | wastebin | `8088` | pastebin at `pb.nul.ie` |
| atticd | `8069` | **currently disabled** (`services.atticd.enable = false`) — an alternative Nix cache that would store locally and sit behind `nix-cache.nul.ie`; config (including the `object/atticd.env` secret) is kept around | | atticd | `8069` | **currently disabled** (`services.atticd.enable = false`) — an alternative Nix cache that would store locally and sit behind `nix-cache.nul.ie`; config (including the `object/atticd.env` secret) is kept around |
@@ -21,33 +21,6 @@ Everything public is fronted by [middleman](middleman.md) (see its vhost table).
`minio-client` is installed and the user's `~/.mc/config.json` points at an age-secret config. `minio-client` is installed and the user's `~/.mc/config.json` points at an age-secret config.
`minio-2025-10-15T17-29-55Z` is allowlisted via `permittedInsecurePackages` (flagged as a TODO). `minio-2025-10-15T17-29-55Z` is allowlisted via `permittedInsecurePackages` (flagged as a TODO).
## HedgeDoc sign-in
HedgeDoc uses the `hedgedoc` [Pocket ID](middleman.md#pocket-id) client with PKCE. Pocket ID
allows members of its `hedgedoc` group. Deploy `middleman` to register the client and group
before deploying `object`.
Before granting an existing HedgeDoc user group membership, link their verified Pocket ID
subject (`sub`) to their existing row in the `hedgedoc` Postgres database. On first sign-in
HedgeDoc looks up the user by `profileid` and creates a user if that subject has no match.
Linking the existing row keeps its note ownership and email/password login.
Verify the procedure on a copy of the database and take a backup before making the live change.
In `psql`, set `hedgedoc_user_id` to the existing user's UUID and `pocket_id_sub` to their
verified Pocket ID subject. Run the update in a transaction and commit only after it returns
exactly the expected row. If a Pocket ID login already created a separate row, resolve that
account before linking.
```sql
UPDATE "Users"
SET profileid = :'pocket_id_sub'
WHERE id = :'hedgedoc_user_id' AND profileid IS NULL
RETURNING id, email;
```
Add the user to the `hedgedoc` group, then verify in a fresh browser session that both login
methods open the same account and its existing private notes.
## Network assignments ## Network assignments
See the consolidated [network assignments](../../../../networking.md#box-assignments) table (this box: `object`). See the consolidated [network assignments](../../../../networking.md#box-assignments) table (this box: `object`).
+3
View File
@@ -26,6 +26,9 @@ The AMD desktop runs the GUI stack (`my.gui.enable`, Sway/Wayland via home-manag
PipeWire, Bluetooth and Thunderbolt. Local `libvirtd`/`virt-manager` and the IOMMU are enabled, but PipeWire, Bluetooth and Thunderbolt. Local `libvirtd`/`virt-manager` and the IOMMU are enabled, but
the box has no VFIO or GPU-passthrough configuration. the box has no VFIO or GPU-passthrough configuration.
`my.agents.antigravity.enable` installs Google's `agy` CLI. Run it in a local checkout and
sign in with your Google account. A paid Google AI Pro or Ultra account can select Gemini 4 Neon.
### Netboot ### Netboot
With `my.netboot.client.enable`, the firmware iPXE-boots from the 2.5G NIC. Kea matches With `my.netboot.client.enable`, the firmware iPXE-boots from the 2.5G NIC. Kea matches
+21 -15
View File
@@ -75,8 +75,8 @@ See the consolidated [network assignments](../../networking.md#box-assignments)
## Paseo ## Paseo
A daemon (`paseo-server`) that starts and manages agents and serves a WebSocket API to the Paseo A daemon (`paseo-server`) that starts and manages agents and serves a WebSocket API to the Paseo
app, the web UI and the `paseo` CLI. Claude Code runs through the Claude Agent SDK, using the app, the web UI and the `paseo` CLI. Claude Code uses the Claude Agent SDK and the installed
installed `claude` and its claude.ai login; Codex runs through `codex app-server`. `claude` login. Codex runs through `codex app-server` and Antigravity through `agy acp`.
### Service ### Service
@@ -110,10 +110,10 @@ from the app don't survive a restart. It:
let an agent change its own mode, answer its own permission prompts or open terminals; let an agent change its own mode, answer its own permission prompts or open terminals;
- requires relay replay protection; - requires relay replay protection;
- turns off dictation and voice, which would otherwise download a large local speech model; - turns off dictation and voice, which would otherwise download a large local speech model;
- hides providers other than Claude and Codex; - enables Claude, Codex and Antigravity in the provider picker;
- adds "Claude, bypass permissions" and "Codex, full access" agent profiles. Each provider's - adds "Claude, bypass permissions" and "Codex, full access" agent profiles. Select one when
default mode is hardcoded upstream (Claude `auto`, Codex `auto-review`), and profiles are the starting an agent to override the upstream defaults (`auto` for Claude and `auto-review`
only way to preset one, so pick a profile when starting an agent for the permissive mode. for Codex).
### Connectivity ### Connectivity
@@ -163,7 +163,7 @@ through `jj`:
Paseo has the full rights of `slop-cannon`, and `slop-cannon` has root: anyone with the daemon Paseo has the full rights of `slop-cannon`, and `slop-cannon` has root: anyone with the daemon
password or a pairing controls the VM. password or a pairing controls the VM.
- Claude Code and Codex come from the shared `my.agents` home-manager module. - Claude Code, Codex and Antigravity come from the shared `my.agents` home-manager module.
- Claude's user settings deny raw `deploy` and `ssh-machine`, and allow `slop`, since the broker - Claude's user settings deny raw `deploy` and `ssh-machine`, and allow `slop`, since the broker
asks a human where its policy says so. The checkout's `.keys/` only has the committed public asks a human where its policy says so. The checkout's `.keys/` only has the committed public
keys, so reading it isn't denied. Claude's managed settings keys, so reading it isn't denied. Claude's managed settings
@@ -176,15 +176,18 @@ password or a pairing controls the VM.
sandbox (`approval_policy = "never"`, `sandbox_mode = "danger-full-access"`). Agents started sandbox (`approval_policy = "never"`, `sandbox_mode = "danger-full-access"`). Agents started
through Paseo use its defaults unless started with one of the profiles above. through Paseo use its defaults unless started with one of the profiles above.
- Codex stores its credentials in a file. - Codex stores its credentials in a file.
- Antigravity defaults to **Full access** in Paseo. **Default** uses Antigravity's approval
policy for edits and commands. **Accept edits** auto-approves workspace edits and can still
prompt for commands.
### Privileged operations ### Privileged operations
Agents ask [`slop-broker`](../../slop-broker.md) on `palace` for anything needing credentials, with Agents ask [`slop-broker`](../../slop-broker.md) on `palace` for anything needing credentials, with
the `slop` command (`my.agents.slop.enable`). It connects over vsock (CID 3; see the `slop` command (`my.agents.slop.enable`). It connects over vsock (CID 3; see
[`palace`](palace.md#slop-broker)). The agent guide, `slop guide`, is installed as a Claude rule [`palace`](palace.md#slop-broker)). The agent guide, `slop guide`, is installed as a Claude rule
(`~/.claude/rules/slop.md`) and as Codex's `AGENTS.md`. (`~/.claude/rules/slop.md`) and included in the global `AGENTS.md` for Codex and Antigravity.
The `my.agents.rules.slop-approvals` rule adds the local guidance on waiting for approval The `my.agents.rules.slop-approvals` rule adds the local guidance on waiting for approval
and pausing after expiry to both providers' user-level instructions, including in Paseo sessions. and pausing after expiry to each provider's user-level instructions, including in Paseo sessions.
## SSH and first login ## SSH and first login
@@ -197,8 +200,12 @@ To set up provider logins and repos on a fresh agent home, connect with `ssh slo
1. `claude auth login` (a full login; `setup-token` tokens are not enough for every feature). 1. `claude auth login` (a full login; `setup-token` tokens are not enough for every feature).
2. `codex login --device-auth`. 2. `codex login --device-auth`.
3. [Pair a Paseo client](#pair-a-paseo-client). 3. For Antigravity, run `agy acp --login` over SSH as `slop-cannon`. Sign in with a paid Google
4. `slop-clone <owner>/<repo>` for each repo. It clones a colocated jj repo over HTTPS into AI Pro or Ultra account for Gemini 4 Neon. Paseo uses the same token file through the
provider's `SSH_CONNECTION` setting. Once the service has picked up its config, refresh
**Settings → Providers → Antigravity** to see the account's models.
4. [Pair a Paseo client](#pair-a-paseo-client).
5. `slop-clone <owner>/<repo>` for each repo. It clones a colocated jj repo over HTTPS into
`~/src/<repo>` and registers it with Paseo as a local workspace. `~/src/<repo>` and registers it with Paseo as a local workspace.
## Gitea ## Gitea
@@ -210,10 +217,9 @@ scopes `write:repository` and `write:issue`).
authored as Dev through the shared Git config; the pushes are the bot's. authored as Dev through the shared Git config; the pushes are the bot's.
- **`tea`**, Gitea's CLI, is wrapped to log in with the same token, so agents can open and update - **`tea`**, Gitea's CLI, is wrapped to log in with the same token, so agents can open and update
pull requests. pull requests.
- **Pull requests:** a rule for every agent (`my.agents.rules.gitea`: a Claude rule, and part of - **Pull requests:** a rule for every agent (`my.agents.rules.gitea`) makes a pull request from a
Codex's `AGENTS.md`) makes a pull request from a branch of its own the default way to finish a branch of its own the default way to finish a piece of work and explains how to do it with jj
piece of work, and says how with jj and `tea`. A repository's own `AGENTS.md` can allow more, and `tea`. A repository's own `AGENTS.md` can allow more, such as pushing to its main branch.
such as pushing to its main branch.
- **Issues:** the same rule keeps agents' running notes, plans and handoffs in Gitea issues on - **Issues:** the same rule keeps agents' running notes, plans and handoffs in Gitea issues on
the repository they're about, rather than in files on branches that go stale. Durable facts the repository they're about, rather than in files on branches that go stale. Durable facts
still go in the repository's docs, and the issue is closed. still go in the repository's docs, and the issue is closed.
Generated
+6 -6
View File
@@ -1249,16 +1249,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1795807119, "lastModified": 1795984395,
"narHash": "sha256-I8LDdH1nOGNw4m7fRaAzZZTyBEygRzUqp3clT6TY98w=", "narHash": "sha256-AiAdbNcyquBNZLJDE/dVQsYZlKdqlbNlh9XNfJd8jgw=",
"ref": "refs/tags/v0.2.2", "ref": "refs/heads/progress",
"rev": "ef53a39597ddb3052cd4da245829ed7d22a1b167", "rev": "6bce33dc66b232a5401ead98c29adef33eb895fd",
"revCount": 38, "revCount": 62,
"type": "git", "type": "git",
"url": "https://git.nul.ie/dev/slop-broker" "url": "https://git.nul.ie/dev/slop-broker"
}, },
"original": { "original": {
"ref": "refs/tags/v0.2.2", "ref": "refs/heads/progress",
"type": "git", "type": "git",
"url": "https://git.nul.ie/dev/slop-broker" "url": "https://git.nul.ie/dev/slop-broker"
} }
+1 -1
View File
@@ -77,7 +77,7 @@
# Our fork with Jujutsu support, one branch per upstream release it is rebased onto. Don't make # Our fork with Jujutsu support, one branch per upstream release it is rebased onto. Don't make
# it follow our nixpkgs: its npm dependency hash is tied to its own nixpkgs pin. # it follow our nixpkgs: its npm dependency hash is tied to its own nixpkgs pin.
paseo.url = "git+https://git.nul.ie/dev/paseo?ref=fork/jujutsu-v0.17.5"; paseo.url = "git+https://git.nul.ie/dev/paseo?ref=fork/jujutsu-v0.17.5";
slop-broker.url = "git+https://git.nul.ie/dev/slop-broker?ref=refs/tags/v0.2.2"; slop-broker.url = "git+https://git.nul.ie/dev/slop-broker?ref=refs/heads/progress";
slop-broker.inputs.nixpkgs.follows = "nixpkgs-unstable"; slop-broker.inputs.nixpkgs.follows = "nixpkgs-unstable";
borgthin.url = "github:devplayer0/borg"; borgthin.url = "github:devplayer0/borg";
# TODO: Update borgthin so this works # TODO: Update borgthin so this works
+10 -4
View File
@@ -7,21 +7,25 @@ let
agentPkgs = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}; agentPkgs = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system};
slopGuide = "${pkgs.slop-broker}/share/slop-broker/slop-tools.md"; slopGuide = "${pkgs.slop-broker}/share/slop-broker/slop-tools.md";
# Claude takes a rule file each; Codex takes one `AGENTS.md` # Claude takes individual rule files. Codex and Antigravity share one `AGENTS.md`.
rules = optionalAttrs cfg.slop.enable { slop = slopGuide; } rules = optionalAttrs cfg.slop.enable { slop = slopGuide; }
// mapAttrs (name: text: pkgs.writeText "${name}.md" text) cfg.rules; // mapAttrs (name: text: pkgs.writeText "${name}.md" text) cfg.rules;
codexContext = pkgs.concatText "AGENTS.md" (attrValues rules); agentContext = pkgs.concatText "AGENTS.md" (attrValues rules);
in in
{ {
options.my.agents = { options.my.agents = {
enable = mkBoolOpt' false "Whether to install and configure coding agents (Claude Code, Codex)."; enable = mkBoolOpt' false "Whether to install and configure coding agents (Claude Code, Codex).";
antigravity.enable = mkBoolOpt' false "Whether to also install and configure Antigravity CLI.";
slop.enable = mkBoolOpt' false "Whether agents use the `slop` client for privileged operations."; slop.enable = mkBoolOpt' false "Whether agents use the `slop` client for privileged operations.";
rules = mkOpt' (types.attrsOf types.lines) { } rules = mkOpt' (types.attrsOf types.lines) { }
"Instructions for every agent, by name: a Claude rule each, and appended to Codex's `AGENTS.md`."; "Named instructions for every agent, installed as individual Claude rules and combined into an `AGENTS.md` for Codex and Antigravity.";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = optional cfg.slop.enable pkgs.slop-broker; home.packages = optional cfg.slop.enable pkgs.slop-broker;
home.file = mkIf (cfg.antigravity.enable && rules != { }) {
".gemini/AGENTS.md".source = agentContext;
};
programs = { programs = {
# TODO: Remove mutableSettings guard when Home Manager 26.11 releases; 26.05 lacks it. # TODO: Remove mutableSettings guard when Home Manager 26.11 releases; 26.05 lacks it.
@@ -46,7 +50,7 @@ in
} // optionalAttrs (options.programs.codex ? mutableSettings) { } // optionalAttrs (options.programs.codex ? mutableSettings) {
mutableSettings = true; mutableSettings = true;
} // optionalAttrs (rules != { }) { } // optionalAttrs (rules != { }) {
context = "${codexContext}"; context = "${agentContext}";
}; };
claude-code = { claude-code = {
@@ -63,6 +67,8 @@ in
}; };
}; };
}; };
} // optionalAttrs cfg.antigravity.enable {
antigravity-cli.enable = true;
}; };
}; };
} }
@@ -24,42 +24,8 @@ in
configuration = { lib, pkgs, config, assignments, allAssignments, ... }: configuration = { lib, pkgs, config, assignments, allAssignments, ... }:
let let
inherit (lib) genAttrs mkAfter mkMerge mkIf mkForce; inherit (lib) genAttrs mkMerge mkIf mkForce;
inherit (lib.my) networkdAssignment; inherit (lib.my) networkdAssignment;
synapseSecretConfig = config.age.secrets."chatterbox/synapse.yaml".path;
synapseOidcConfig = "/run/matrix-synapse/oidc-providers.json";
pocketIdProvider = pkgs.writeText "synapse-pocket-id.json" (builtins.toJSON {
idp_id = "pocket-id";
idp_name = "Pocket ID";
issuer = "https://id.${pubDomain}";
client_id = "matrix";
client_secret_path = config.age.secrets."chatterbox/synapse-oidc-secret.txt".path;
pkce_method = "always";
scopes = [ "openid" ];
enable_registration = false;
});
# Synapse merges config files at the top level, so append to the private
# provider list before passing it to Synapse as the final config layer.
mergeSynapseOidc = pkgs.writers.writePython3 "merge-synapse-oidc" {
libraries = [ pkgs.python3Packages.pyyaml ];
} ''
import json
import sys
from pathlib import Path
import yaml
private_config, pocket_id_config, output = map(Path, sys.argv[1:])
existing = yaml.safe_load(private_config.read_text())
providers = existing.get("oidc_providers") or []
providers.append(json.loads(pocket_id_config.read_text()))
temporary = output.with_suffix(".tmp")
temporary.write_text(json.dumps({"oidc_providers": providers}))
temporary.replace(output)
'';
in in
{ {
config = mkMerge [ config = mkMerge [
@@ -75,10 +41,6 @@ in
owner = "matrix-synapse"; owner = "matrix-synapse";
group = "matrix-synapse"; group = "matrix-synapse";
}; };
"chatterbox/synapse-oidc-secret.txt" = {
owner = "matrix-synapse";
group = "matrix-synapse";
};
"chatterbox/nul.ie.signing.key" = { "chatterbox/nul.ie.signing.key" = {
owner = "matrix-synapse"; owner = "matrix-synapse";
group = "matrix-synapse"; group = "matrix-synapse";
@@ -119,11 +81,7 @@ in
systemd = { systemd = {
network.networks."80-container-host0" = networkdAssignment "host0" assignments.internal; network.networks."80-container-host0" = networkdAssignment "host0" assignments.internal;
services = { services = { } // (genAttrs [ "mautrix-whatsapp" "mautrix-meta-messenger" "mautrix-meta-instagram" ] (_: {
matrix-synapse.preStart = mkAfter ''
${mergeSynapseOidc} ${synapseSecretConfig} ${pocketIdProvider} ${synapseOidcConfig}
'';
} // (genAttrs [ "mautrix-whatsapp" "mautrix-meta-messenger" "mautrix-meta-instagram" ] (_: {
# ffmpeg needed to convert GIFs to video # ffmpeg needed to convert GIFs to video
path = with pkgs; [ ffmpeg ]; path = with pkgs; [ ffmpeg ];
})); }));
@@ -141,7 +99,7 @@ in
"oidc" "oidc"
]; ];
extraConfigFiles = [ synapseSecretConfig synapseOidcConfig ]; extraConfigFiles = [ config.age.secrets."chatterbox/synapse.yaml".path ];
settings = { settings = {
server_name = "nul.ie"; server_name = "nul.ie";
public_baseurl = "https://matrix.nul.ie"; public_baseurl = "https://matrix.nul.ie";
@@ -17,8 +17,6 @@ in
"middleman/oauth2-proxy.env" = { }; "middleman/oauth2-proxy.env" = { };
# Client secrets shared with the boxes that run the apps # Client secrets shared with the boxes that run the apps
"gitea/oidc-secret.txt" = { }; "gitea/oidc-secret.txt" = { };
"chatterbox/synapse-oidc-secret.txt" = { };
"object/hedgedoc-oidc.env" = { };
# Not deployed anywhere else: mailcow isn't NixOS, so it's pasted into its admin UI # Not deployed anywhere else: mailcow isn't NixOS, so it's pasted into its admin UI
"mailcow/oidc-secret.txt" = { }; "mailcow/oidc-secret.txt" = { };
}; };
@@ -29,7 +27,6 @@ in
groups = { groups = {
admins.friendlyName = "Admins"; admins.friendlyName = "Admins";
hedgedoc.friendlyName = "HedgeDoc";
}; };
clients = { clients = {
@@ -54,26 +51,6 @@ in
secret.file = config.age.secrets."gitea/oidc-secret.txt".path; secret.file = config.age.secrets."gitea/oidc-secret.txt".path;
}; };
matrix = {
name = "Matrix";
callbackURLs = [ "https://matrix.${pubDomain}/_synapse/client/oidc/callback" ];
launchURL = "https://element.${pubDomain}/";
pkce = true;
secret.file = config.age.secrets."chatterbox/synapse-oidc-secret.txt".path;
};
hedgedoc = {
name = "HedgeDoc";
callbackURLs = [ "https://md.${pubDomain}/auth/oauth2/callback" ];
launchURL = "https://md.${pubDomain}/";
pkce = true;
allowedGroups = [ "hedgedoc" ];
secret = {
file = config.age.secrets."object/hedgedoc-oidc.env".path;
key = "CMD_OAUTH2_CLIENT_SECRET";
};
};
# mailcow's Generic-OIDC identity provider (`mail` VM), for mailbox sign-in # mailcow's Generic-OIDC identity provider (`mail` VM), for mailbox sign-in
mailcow = { mailcow = {
name = "mailcow"; name = "mailcow";
@@ -24,12 +24,10 @@ in
configuration = { lib, pkgs, pkgsFlakes, config, assignments, ... }: configuration = { lib, pkgs, pkgsFlakes, config, assignments, ... }:
let let
inherit (lib) mkAfter mkMerge mkIf mkForce; inherit (lib) mkMerge mkIf mkForce;
inherit (config.my.user.homeConfig.lib.file) mkOutOfStoreSymlink; inherit (config.my.user.homeConfig.lib.file) mkOutOfStoreSymlink;
inherit (lib.my) networkdAssignment systemdAwaitPostgres; inherit (lib.my) networkdAssignment systemdAwaitPostgres;
pocketId = "https://id.${pubDomain}";
# TODO: Migrate the object store and remove this MinIO compatibility pin. # TODO: Migrate the object store and remove this MinIO compatibility pin.
minioPkgs = import pkgsFlakes.mine-stable { minioPkgs = import pkgsFlakes.mine-stable {
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
@@ -86,7 +84,6 @@ in
"object/atticd.env" = {}; "object/atticd.env" = {};
"nix-cache.key" = {}; "nix-cache.key" = {};
"object/hedgedoc.env" = {}; "object/hedgedoc.env" = {};
"object/hedgedoc-oidc.env" = {};
"object/wastebin.env" = {}; "object/wastebin.env" = {};
}; };
}; };
@@ -141,10 +138,6 @@ in
awaitPostgres = systemdAwaitPostgres pkgs.postgresql "colony-psql"; awaitPostgres = systemdAwaitPostgres pkgs.postgresql "colony-psql";
in in
{ {
hedgedoc.serviceConfig.EnvironmentFile = mkAfter [
config.age.secrets."object/hedgedoc-oidc.env".path
];
minio = { minio = {
environment = { environment = {
MINIO_ROOT_USER = "minioadmin"; MINIO_ROOT_USER = "minioadmin";
@@ -257,19 +250,6 @@ in
allowAnonymousEdits = true; allowAnonymousEdits = true;
email = true; email = true;
allowEmailRegister = false; allowEmailRegister = false;
oauth2 = {
providerName = "Pocket ID";
clientID = "hedgedoc";
authorizationURL = "${pocketId}/authorize";
tokenURL = "${pocketId}/api/oidc/token";
userProfileURL = "${pocketId}/api/oidc/userinfo";
userProfileIdAttr = "sub";
userProfileUsernameAttr = "sub";
userProfileDisplayNameAttr = "name";
userProfileEmailAttr = "email";
scope = "openid profile email";
pkce = true;
};
}; };
}; };
+1
View File
@@ -281,6 +281,7 @@ in
}; };
my = { my = {
agents.antigravity.enable = true;
gui = { gui = {
standalone = true; standalone = true;
manageGraphical = true; manageGraphical = true;
+6 -2
View File
@@ -242,6 +242,7 @@ in
home-manager.users.${agentUser} = { home-manager.users.${agentUser} = {
my.agents = { my.agents = {
enable = true; enable = true;
antigravity.enable = true;
slop.enable = true; slop.enable = true;
rules.gitea = giteaRule; rules.gitea = giteaRule;
rules.slop-approvals = '' rules.slop-approvals = ''
@@ -365,8 +366,11 @@ in
voiceMode.enabled = false; voiceMode.enabled = false;
}; };
agents.providers = lib.genAttrs agents.providers = lib.genAttrs
[ "copilot" "opencode" "pi" "omp" "antigravity" "muse" ] [ "copilot" "opencode" "pi" "omp" "muse" ]
(_: { enabled = false; }); (_: { enabled = false; }) // {
# Use the token file from the agent user's SSH login.
antigravity.env.SSH_CONNECTION = "paseo";
};
log.file.level = "info"; log.file.level = "info";
}; };
}; };
+2
View File
@@ -160,6 +160,8 @@
user = { user = {
tmphome = false; tmphome = false;
homeConfig = { homeConfig = {
my.agents.antigravity.enable = true;
services = { services = {
network-manager-applet.enable = true; network-manager-applet.enable = true;
}; };
@@ -1,18 +0,0 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFpCM2U2USAwZG9S
UStBWHJGTjdYWG5kNkE0SFhObDBVVzRXcjBjaWdDMVNhQmN0aENRCm1xYnRURUtr
T3ZldWxxVjR3cFdoRlhLRzhYT250RWJFc3F1eDN1TlJMOGMKLT4gc3NoLWVkMjU1
MTkgVkZjdzVnIDY1VDRNS1l5QTR5MnhCTHZmY1FkQ1pUNXJhdGtVWUtnUGpZUnJN
dnFmd2MKbVpzd21wcndEVnNOaTdVTkZ3ajZNZ2pMQTRueERJZitQREZyamRPcURv
awotPiBYMjU1MTkgM3ZQMTJjVGthb2JkL3VEUFRSSWJ5TWlYc0M1djFzVG41ckdF
SEQxemNBUQovK0YxZU0wOUxPSkZ2Z3BVb3RZSGRXOEltQXF5SUtoNDhwaWNKNU9u
TEp3Ci0+IFgyNTUxOSBOMEFXV3N1MS9LaCtGVzAvUUQ4bTF2a0o4WFJ1ekZTSHJR
NlBHR2NwbFdjCnNJTE1nTDFhQk9taHVoaUpyZURpTUN3YjdiemswKzVndGZlNE5u
eFpKcW8KLT4gdixScHxnNC1ncmVhc2UgdWB5YXhRIHYpTzRDMzwgMDNoNkJQKywg
JCZvZ3BqClQwYzVsTkxBcjFoa0JUUHRBb2dqZ2VvSW5XeUpVTlZZdFM5bmhCKzdP
Mks0YjBLSHlvdi9pK3QwK05veVpTZEYKN0lJd3NlSENRN1NPNG9vTy9UWTBhVm13
dGx0Z3hRbWFxOWUvYWhVUEhicWdvM3N3TkFJbk9OSisvbnEwSnAyMwp2ejgKLS0t
IER6RFVDbllkTTJuOWZSVFFPajBCclUxRnlpOGs3Q20wTDZ2UFU0WHZkUVEK7JcZ
+Xezwqe4Ii4VCRF0iThr1EGRSUW826D0gVV48Wq9QwOy4O6HMdJs+fUWxG3buXc/
5Bo/AmHfeGzM0HwwRAujea0TSPwVsLRsinswHsG0OvtVFFJIoKgvTgEiFc2y0Q==
-----END AGE ENCRYPTED FILE-----
-16
View File
@@ -1,16 +0,0 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZGY3c1ZyAvK2t2
Mkd0cWlnQ1NjNkYzQWZhdVprRjVYS0oyd0dTRWVmL1Y4YUk0aGhNCnJzaGlOajNF
OE1CbzdGbDRnMDZTcTdveXBrYnFGazh0R2FuSklzeHVLc0kKLT4gc3NoLWVkMjU1
MTkgaGtidHZnIFFhL3I4VHVxbzg0R2sxSmhaaHV1Lzh0a2JJdXdwWGk4STl0Q1JE
RWFwRWcKL0J0SVdSTDB6UWhSOXNWc2NKakJLanU1SlNDK2IwSjZSNytSZ2tJZ1E1
QQotPiBYMjU1MTkgUGxXTkh6VUt5L3l3NXVRN3kzTm4zSGF2VTlqYzBnM2RvejNK
N1NNZEExYwp0ZDF3RWtibmRNZnpWNTM4RW0rUDdqcGRERk9NTWY4KzZESWY3bDNo
TkNNCi0+IFgyNTUxOSBNMkNoencrN3loUmdmMGZXYUhyaDJUSkU1dSswVG5nODhX
ZE5nSEV6TlYwCjdtZXJwNEJvY1N2SmpaSGtlZlpwT0dwM3ZvSjlKbzNaTHBDMkt3
OWUvSHcKLT4gOy4tZ3JlYXNlIGtUJ15rRHxSIE4gQnoKZFh5NGZrMjR6d0xEczNm
NgotLS0gRUs1NFdCL01Oc01JcmdkNmNyOXNpRXpyL3RZNExQM0RWQTZvYk0rckt6
VQptmipZPk+F8euA2UNfb7h9MRSkCUfLeopA8L1af1cxr3X7rf/bLnmExqdDXbc+
0Y9CAU1wUusZtxbh0gJHhBfYFJVjtnWxghMOaJYOq7sJY3CX9/XEo8KRfb1Uju9J
iRVNvzcAEoxo7YQwRm7NylJdEh2voo/e4VZUIQ==
-----END AGE ENCRYPTED FILE-----