common: add jq to systemPackages

jq was only ever on the `path` of the units that call it, so it was absent
from an interactive shell — which made the hook-migration commands in the
README unrunnable on the host they target. It is a general-purpose tool and
every host already carries curl, so it belongs alongside it rather than being
pulled in per-unit.

Also simplifies those README commands now that jq is present, and uses mars's
existing `hermes` alias instead of spelling out the podman exec.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94o42aQ8VkBmEWvDem5xa
This commit is contained in:
2026-08-23 07:04:30 +02:00
co-authored by Claude Opus 5
parent 3567591ecf
commit e14571d029
2 changed files with 10 additions and 8 deletions
+9 -7
View File
@@ -59,19 +59,21 @@ Retiring the pre-rename `gitea-events` route is therefore a one-off, done by
hand after the first deploy of both hosts: hand after the first deploy of both hosts:
``` ```
# on mars — drop the old subscription # on mars — drop the old subscription (`hermes` is the alias in common.nix)
sudo podman exec hermes-agent hermes webhook remove gitea-events hermes webhook remove gitea-events
# on jupiter — delete the old hook (it posts to the relay's bare /gitea path) # on jupiter — delete the old hook (it posts to the relay's bare /gitea path)
api=http://127.0.0.1:3000/api/v1; repo=darman/homelab api=http://127.0.0.1:3000/api/v1; repo=darman/homelab
tok="$(sudo cat /run/secrets/gitea_provisioning_token)" auth=(-H "Authorization: token $(sudo cat /run/secrets/gitea_provisioning_token)")
old="$(curl -fsS -H "Authorization: token $tok" "$api/repos/$repo/hooks" \ for id in $(curl -fsS "${auth[@]}" "$api/repos/$repo/hooks" \
| jq -r '.[] | select(.config.url == "http://mars.orbit.sol:8645/gitea") | .id')" | jq -r '.[] | select(.config.url == "http://mars.orbit.sol:8645/gitea") | .id'); do
for id in $old; do curl -fsS "${auth[@]}" -X DELETE "$api/repos/$repo/hooks/$id"
curl -fsS -H "Authorization: token $tok" -X DELETE "$api/repos/$repo/hooks/$id"
done done
``` ```
Or just delete it in the web UI: repo Settings -> Webhooks, the entry whose
URL ends in `:8645/gitea` with no route after it.
Check `hermes webhook list` and the repo's webhook page afterwards; until the Check `hermes webhook list` and the repo's webhook page afterwards; until the
old hook is gone both it and the new one fire, so events arrive twice. old hook is gone both it and the new one fire, so events arrive twice.
+1 -1
View File
@@ -51,7 +51,7 @@
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
environment.systemPackages = with pkgs; [ git btop tmux curl wget zsh-powerlevel10k lsd ]; environment.systemPackages = with pkgs; [ git btop tmux curl wget zsh-powerlevel10k lsd jq ];
# ---- home-manager (user-level config for darman, all hosts) ---- # ---- home-manager (user-level config for darman, all hosts) ----
# Requires home-manager.nixosModules.home-manager in the host's own # Requires home-manager.nixosModules.home-manager in the host's own