No description
  • Nix 88.4%
  • TypeScript 5.9%
  • Python 5.4%
  • Just 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pim Kunis cddc24217b Teach the media agent the download pipeline
The agent could file a request but then only read back Jellyseerr's coarse
status, so "waar blijft mijn film?" got an unhelpful answer. It now knows how
Jellyseerr, Radarr/Sonarr, Prowlarr, qBittorrent, Bazarr and Jellyfin fit
together, and can see into them.

The system prompt covers the two states that actually confuse people: that a
release is sometimes never found (so nothing happens, with no error anywhere),
and that a download can sit at 100% while the *import* failed -- the hardlink
permissions trap already documented here. It also knows the ~10 days of
seeding afterwards is normal, so it stops reporting that as a fault.

downloads.ts adds two read-only tools: download_status(title) merges the
Sonarr/Radarr queues with qBittorrent for one title, surfacing
trackedDownloadStatus and statusMessages where a stuck import actually shows
up; download_problems() lists everything warning, erroring or stalled.

Deliberately read-only -- no retry, pause or delete, even though those APIs are
right there. A diagnostic tool that can also act turns "why is this stuck?"
into an agent retrying things unsupervised. The tools are also what keep the
new pipeline knowledge honest: a model given a detailed mental model of a
system it cannot observe will narrate a plausible journey for a film that was
never grabbed.

Two qBittorrent API quirks cost a debug round and are now in CLAUDE.md: login
answers 204 with an empty body (not 200 "Ok."), and the session cookie is
QBT_SID_8080, not SID. Also fixed download_problems swallowing an unreachable
*arr and reporting "nothing is stuck", which is a worse answer than the outage.

The shim now takes a colon-separated PI_EXTENSIONS list.

Verified against a live download: Okja observed at 3.4%, then complete and
seeding, with the agent's description matching qBittorrent ground truth.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-18 20:56:20 +02:00
.zed Set formatter in Zed and format repo 2026-04-30 18:21:47 +02:00
claude Replace deluge with qBittorrent + unpackerr on roeland 2026-10-10 14:46:58 +02:00
modules Teach the media agent the download pipeline 2026-10-18 20:56:20 +02:00
secrets Replace Grafana alerting with Alertmanager on warwick 2026-08-26 20:11:23 +02:00
.envrc Consolidate MCP config into .mcp.json with sops-encrypted secrets 2026-04-24 18:20:03 +02:00
.gitignore Add zigbee map to HA 2026-09-03 21:18:42 +02:00
.mcp.json Replace hass-mcp with ha-mcp on atlas 2026-09-19 19:34:51 +02:00
.sops.yaml Add family media agent: pi behind Open WebUI on atlas 2026-10-18 20:37:22 +02:00
CLAUDE.md Teach the media agent the download pipeline 2026-10-18 20:56:20 +02:00
flake.lock Add family media agent: pi behind Open WebUI on atlas 2026-10-18 20:37:22 +02:00
flake.nix Add family media agent: pi behind Open WebUI on atlas 2026-10-18 20:37:22 +02:00
globals.nix Add family media agent: pi behind Open WebUI on atlas 2026-10-18 20:37:22 +02:00
Justfile Remove Nebula traces 2026-07-24 17:11:30 +02:00
lamp-ble-proxy.yaml esphome: Prometheus metrics for lamp + fix m5stack voice audio 2026-07-14 23:54:47 +02:00
m5stack-atom-echo-1b4530.yaml Enable STT server 2026-08-29 09:55:19 +02:00
README.md docs: add Audiobookshelf to roeland host description 2026-06-27 12:05:57 +02:00

nixos-configs

NixOS configurations for the machines I manage.

Currently managed systems:

  • blocktech: My current laptop, a ThinkPad P1 running GNOME.
  • gamepc: My gaming PC running Cosmic
  • warwick: A Raspberry Pi 4 Model B, which mostly does monitoring
  • atlas: A Gigabyte Brix, currently running NixOS containers
  • lewis: A Gigabyte Brix, currently running NixOS containers
  • roeland: A Minisforum UN100P, runs my Jellyfin + *arr + Audiobookshelf setup

Deployment

I use Colmena for deploying my machines.

To apply to the local machine:

sudo colmena apply-local --sudo

To apply to all remotely managed systems:

colmena apply

Collabora manual actions

Apart from the declarative commands, these commands also need to be ran on the server for a successful Collabora setup:

# From the perspective of Nextcloud
nextcloud-occ config:app:set richdocuments wopi_url --value="http://collabora.mesh.kun.is:9980"
# From the perspective of clients
nextcloud-occ config:app:set richdocuments public_wopi_url --value="http://collabora.mesh.kun.is"
nextcloud-occ richdocuments:activate-config