The test pair served the move to NixOS, which is done. Its overlays,
dummy secrets and sops recipients go; the rules for testing on a copy
of production stay in nixos/README.md, and git log finds the overlay
if it is needed again. Options that existed only for it (alert address,
Loki bucket, extra cert-push keys) are inlined, and comments still
pointing at Ansible or MIGRATION.md are corrected.
The tofu README now spells out the state bucket bootstrap: the bucket
is a resource in the state it holds, so a new project needs one local
apply first. The bucket gets prevent_destroy for the same reason.
Assisted-by: Claude:opus-5-5
The runner's token was regenerated in Forgejo (runner asxpio-services,
same UUID), which also retires the registration-token route the NixOS
module used. Both runners now work the same way: settings from Nix, the
connection (URL, UUID, token from sops) merged in at start, no
registration step. A new token is a sops change and a deploy.
Corrects 0a54caa: `forgejo actions generate-runner-token` returned the
existing registration token, so that commit rotated nothing.
Assisted-by: Claude:opus-5-5
The token sat in the old repository history. Forgejo generated a new
one, which retires the old; the runner re-registers with it on this
deploy (the job running the deploy shows as cancelled; the next run
confirms). The old runner entry stays behind offline.
Assisted-by: Claude:opus-5-5
Forgejo's INTERNAL_TOKEN, JWT_SECRET and LFS_JWT_SECRET sat in the old
repository history for a year; Grafana ran on its public default
secret_key. New values, generated by Forgejo and openssl, straight into
sops. SECRET_KEY stays: changing it would break 2FA.
sops-nix does not restart anything when a secret changes. The secrets
now name the unit that reads them (Forgejo, Grafana, postgres-roles,
garage-bootstrap), so a changed value takes effect on the deploy.
Assisted-by: Claude:opus-5-5
`podman` run as an admin showed that user's own, empty rootless store,
so `podman ps` needed sudo while `docker ps` did not. Point CONTAINER_HOST
at the system Podman's socket, which group podman (the admins) may use.
The rehearsal ops server was rebuilt and has a new host key.
Assisted-by: Claude:opus-5-5
Every host runs node_exporter, cAdvisor (now against Podman), Alloy and
the security-metrics script, on its private address. Each service
declares its own expected ports, users and privileged containers next
to its definition, so the security baseline follows the config instead
of a separate inventory list.
On ops: Prometheus, Loki, Grafana, the blackbox prober and the Postgres
exporter, with the same scrape jobs, probes, retention, dashboards and
33 alert rules. Two rules matched container-era names and now match the
native ones: Forgejo's log is unit forgejo.service, Grafana's route is
grafana@file.
Grafana keeps its default secret_key on production, because its
database was written with it; rotating it is a separate step.
Prometheus, Grafana and Alloy come from nixos-unstable: their data is
from newer versions than 26.05 ships.
LLMNR and mDNS are off: the baseline flagged them as public listeners.
Tried on the rehearsal pair: all 28 scrape targets up, logs from both
hosts in Loki, Grafana WireGuard-only, no unexpected port, user or
container on either host.
Assisted-by: Claude:opus-5-5
s3-replicate is the same rclone sync with the same delete limit, run by
the rclone package instead of its image.
The certificate push keeps its shape: ops reads Traefik's acme.json and
sends each certificate over SSH with a key that may run one command on
services, from ops only. The key is now a sops secret with its public
half in the config, instead of being generated on the host, so a
rebuilt pair works without a manual step. Tried on the rehearsal pair
with a throwaway certificate; any other command is refused.
Assisted-by: Claude:fable-5-2
Traefik keeps its role and its acme.json. Routes for the native
services (Forgejo, Garage, the dashboard, the XMPP certificate) are
written from Nix; the app containers keep declaring theirs as labels,
which Traefik reads through Podman's socket as it did through Docker's.
The asxpio runner uses the NixOS module and starts jobs through Podman;
the interop runner is its own unit because it connects with a UUID and
token instead of registering.
Tried on the rehearsal pair: Forgejo and Garage through Traefik, a
label-routed container, anonymous reads of the public bucket only, and
a workflow with a nix-latest and an ubuntu-latest job.
A restored Forgejo database still holds production's queued jobs,
schedules and Actions secrets. The test runner tried to take a queued
production job and was stopped only by the different secret key.
migration/rehearsal-sanitize-forgejo.sh removes all of that and must
run before a runner meets restored data.
Assisted-by: Claude:fable-5-2
Start of the move from Ansible to NixOS. Services run as native NixOS
services where nixpkgs has a module and as Podman containers otherwise;
there is no Docker.
Shared: users with their Debian UIDs, SSH with the Ansible role's crypto
settings, nftables firewall, WireGuard (ops is the hub), sops-nix
secrets per host, the restic backup script with its schedule and
retention, mail on unit failure.
asxpio-services: Xray, SillyTavern, Minecraft (Paper) and the ACME
forwarder natively; XMPP stays in containers because the server is a
custom build.
asxpio-ops: Postgres, Garage and Forgejo natively. Roles, buckets, keys
and grants move here from the storage repo's init scripts.
Services that own data wait for /var/lib/.data-in-place, so an install
never creates empty state where a restore is about to land.
migration/*-data.sh move the Debian-era data into the new layout.
hosts/rehearsal turns the two hosts into a test pair with its own keys
and dummy secrets. Everything here ran there, Postgres, Garage, Forgejo,
Minecraft and SillyTavern on a restored copy of production data. Three
differences from the containers showed up and are handled: Garage
rejects a 0440 credential file, Geyser needs libcrypto and netlink,
SillyTavern ignores the module's listen flags.
Production is untouched: both servers still run Debian under Ansible.
Assisted-by: Claude:fable-5-2