Commit graph

174 commits

Author SHA1 Message Date
b805a5b395
dns: mux.anotherim for the interop test server
The anotherim test server gets the MUX room service, an XMPP
component at mux.<domain>, for the interop runs of MUX rooms and MLS
channels. It needs a name and a certificate of its own. A and AAAA
at the test server's addresses, unprotected like its other records.

Applied 2026-11-24.

Assisted-by: Claude:fable-5-2
2026-11-24 18:43:06 +05:00
27a022b9ea
renovate: refresh flake.lock daily
Lock maintenance ran only before 6am on Mondays, so nixpkgs fixes
waited up to a week before reaching the hosts: OpenSSH 10.6p2 has
been in nixos-26.05 since early November while both hosts still run
10.6p1 from the 2026-11-11 lock. Renovate already runs on iac every
15 minutes, so a daily window is enough to pick fixes up the next
morning.

Assisted-by: Claude:opus-5-5
2026-11-19 09:42:42 +04:00
55f3036574
services: restart Minecraft after it exits on its own
All checks were successful
nixos / nixos (push) Successful in 28s
AutoUpdateGeyser restarts the server with /restart. Paper finds no
start script, stops and exits 0, and Restart=always should start it
again. The module binds the stdin socket to the service, though: the
exit stopped the socket, the socket's stop cancelled the restart, and
the server stayed down from 2026-11-17 16:01 until started by hand.

PartOf keeps the socket across an exit and still stops it with the
service. FlushPending already drops the "stop" ExecStop leaves in the
FIFO.

Assisted-by: Claude:opus-5-5
2026-11-18 12:49:38 +04:00
8a6db9c5b4
deps: Update app releases
All checks were successful
nixos / nixos (push) Successful in 30s
2026-11-17 10:38:12 +00:00
19cf77b603
renovate: one branch for all app releases
Each app's bump had its own branch; every merge left the others
behind main, so they rebased and waited another 15-minute run each. One
group merges pending releases of all apps together.

Assisted-by: Claude:opus-5-5
2026-11-17 14:23:18 +04:00
998ce26478
ops: no more app containers on Postgres and Garage
All checks were successful
nixos / nixos (push) Successful in 24s
asxpio, datacenterbingo, blog and czsk run on asxpio-services now and
reach Postgres and Garage over the private network; vhpbot, the last
container, uses neither. So Postgres no longer admits Podman's networks,
the firewall no longer opens 5432 and 3900 to them, and the container
plumbing for the Docker-era storage stack goes: the postgres/garage host
aliases and the empty storage network.

Assisted-by: Claude:opus-5-5
2026-11-17 14:21:00 +04:00
1a3d283e63
asxpio: container removed; its monitor runs on services now
All checks were successful
nixos / nixos (push) Successful in 24s
The asxpio and asxpio-monitor containers, their images and /opt/asxpio
are gone from asxpio-ops, so the native monitor worker starts and the
routes no longer have to outrank container labels.

Assisted-by: Claude:opus-5-5
2026-11-17 14:16:20 +04:00
05ed9f5375
asxpio: route asxp.io and admin.asxp.io to the service on asxpio-services
All checks were successful
nixos / nixos (push) Successful in 24s
Priority 2000 over the container's labels until it is removed;
admin.asxp.io keeps the internal-only allowlist (WireGuard + VPC). The
failed-login alert and the Security dashboard count asxpio's routers by
their new names, and the dashboard's Grafana panel by grafana@file, the
name it has had since Grafana became a native service.

Assisted-by: Claude:opus-5-5
2026-11-17 14:14:50 +04:00
0ee1c600e6
services: run asxpio from its flake, beside the container
All checks were successful
nixos / nixos (push) Successful in 26s
asxpi/asxpio now exports the app (bundlerEnv, ImageMagick 7) and a
module running the site and its monitor worker as hardened systemd
services. services runs the site on :3001 next to the container on ops;
no route yet, and the monitor stays off until the container's stops.
pg_hba lets the asxpio role in from 10.10.0.20 too (restarts Postgres
once); the settings and secrets, copied from the container's
environment with the database and Garage on ops' private address, are
in services' sops file. Renovate automerges its bumps like the other
apps'.

Assisted-by: Claude:opus-5-5
2026-11-17 14:12:45 +04:00
1100800576
datacenterbingo: container removed, its route needs no priority
All checks were successful
nixos / nixos (push) Successful in 23s
Assisted-by: Claude:opus-5-5
2026-11-17 13:57:07 +04:00
4e967372ae
datacenterbingo: route to the service on asxpio-services
All checks were successful
nixos / nixos (push) Successful in 23s
Priority 2000 over the container's labels (1000), until the container
is removed. The listening process is puma, as the baseline sees it.

Assisted-by: Claude:opus-5-5
2026-11-17 13:54:59 +04:00
0b30461938
services: run datacenterbingo from its flake, beside the container
All checks were successful
nixos / nixos (push) Successful in 22s
asxpi/datacenterbingo now exports the app (bundlerEnv) and a module
running it as a hardened systemd service. services runs it on :3002
next to the container on ops; no route yet. It reaches Postgres and
Garage on ops over the private network: pg_hba lets the read-only bingo
role in from 10.10.0.20 (this restarts Postgres once), and its secrets,
copied from the container's environment, are in services' sops file.
Renovate automerges its bumps like the other apps'.

Assisted-by: Claude:opus-5-5
2026-11-17 13:52:15 +04:00
9cd41e7543
czsk: container removed, its route needs no priority
All checks were successful
nixos / nixos (push) Successful in 22s
Assisted-by: Claude:opus-5-5
2026-11-17 13:33:18 +04:00
521f04fb58
czsk: route czsk.it to the service on asxpio-services
All checks were successful
nixos / nixos (push) Successful in 22s
Priority 2000 over the container's labels, until the container is
removed.

Assisted-by: Claude:opus-5-5
2026-11-17 13:31:57 +04:00
3522fdb4f1
czsk: take the fix for nginx's header check
All checks were successful
nixos / nixos (push) Successful in 22s
The previous czsk commit failed services' build: gixy refused a location
whose add_header dropped the server's security headers. comin kept the
running system; this moves the input to the fixed commit.

Assisted-by: Claude:opus-5-5
2026-11-17 13:30:05 +04:00
0b3bb707ae
services: serve czsk.it from its flake, beside the container
All checks were successful
nixos / nixos (push) Successful in 22s
czsk/czsk now exports the site and a module serving it from an nginx
virtual host with its headers, gzip and caching. services runs it on
:8082 next to the container on ops; no route yet. Renovate automerges
its bumps like the blog's.

Assisted-by: Claude:opus-5-5
2026-11-17 13:18:47 +04:00
cb9db0ed73
traefik: routes from a watched file, no restart on a route change
All checks were successful
nixos / nixos (push) Successful in 21s
The NixOS module writes the routes (dynamicConfigOptions) into the
static configuration, so every route change restarted Traefik: about 15
seconds with every site down (08:24 and 09:14 today; the second broke
czsk's image push). The routes now go to /etc/traefik/dynamic.toml, a
copy activation replaces, and Traefik's file provider watches it; the
static configuration stays the same. This deploy restarts Traefik once.

Assisted-by: Claude:opus-5-5
2026-11-17 13:16:57 +04:00
677c7eb34a
blog: container removed, its route needs no priority
All checks were successful
nixos / nixos (push) Successful in 21s
The blog container and /opt/blog are gone from asxpio-ops, so the route
to the NixOS service no longer has to outrank its labels.

Assisted-by: Claude:opus-5-5
2026-11-17 13:13:24 +04:00
368393eaca
until comin status --json | jq -e '.deployer.deployment.generation.selected_commit_id == "$H" and (.deployer.deployment.status == "done" or .deployer.deployment.status == "failed")' >/dev/null; do sleep 10; done
All checks were successful
nixos / nixos (push) Successful in 21s
comin status --json | jq -r '.deployer.deployment.status'
loginctl list-users --no-legend | awk '{print \$2, \$3}' | tr '\n' ' '; echo
ls /var/lib/systemd/linger
EOF
git log --oneline -1
nixos: keep the login users' systemd managers running (linger)

Every SSH login starts a user's systemd manager and the logout stops it:
a git push as git, a CI deploy, an admin session. A switch that reloads
user units while one is starting or stopping fails with status 4
although the system did switch, and comin reports the deployment as
failed; at 08:50 a push as git did this on ops and the "Deploy failing"
alert mailed. With linger the managers run permanently.

Assisted-by: Claude:opus-5-5
2026-11-17 13:11:13 +04:00
352f69855f
deps: Update blog digest to bbd489c
All checks were successful
nixos / nixos (push) Successful in 22s
2026-11-17 08:53:02 +00:00
ea8861229a
grafana: taller Hosts table on the Deploys dashboard
All checks were successful
nixos / nixos (push) Successful in 21s
Assisted-by: Claude:opus-5-5
2026-11-17 12:49:25 +04:00
17bf20cdbc
flake: pin the blog input's commit in its URL, for Renovate
All checks were successful
nixos / nixos (push) Successful in 25s
Renovate's nix manager follows a flake input along its branch only when
the URL names a commit (rev=); without one it leaves the input to lock
file maintenance, which bumps every input at once. The blog input now
carries ref=main and the deployed rev, which Renovate moves forward.

Assisted-by: Claude:opus-5-5
2026-11-17 12:44:22 +04:00
ea1622ffa9
grafana: Deploys dashboard for comin
All checks were successful
nixos / nixos (push) Successful in 26s
One row per host: deployed commit (linked to Forgejo), last deployment,
whether the head of main is signed or still waiting, failing stages,
reboot needed, suspended, last activation. Below: the stage and head
history, fetch rate, activations, and comin's log from Loki.

Assisted-by: Claude:opus-5-5
2026-11-17 12:32:28 +04:00
c51e7414ae
blog: route to the service on asxpio-services; automerge app bumps
All checks were successful
nixos / nixos (push) Successful in 21s
Traefik routes blog.asxp.io to the blog's NixOS service at priority
2000, above the container's labels; removing the route falls back to the
container. Renovate merges bumps of the app inputs (blog for now) onto
main by itself once CI passes, as a signed fast-forward, so comin deploys
an app commit without anyone merging it.

Assisted-by: Claude:opus-5-5
2026-11-17 12:23:24 +04:00
4a6c4ac3a3
services: serve the blog from its flake, beside the container
All checks were successful
nixos / nixos (push) Successful in 22s
The blog's repository now exports the built site and a module serving it
from an nginx virtual host. services runs it on :8081 next to the
container on ops; Traefik does not route to it yet. Routes get an
optional priority, so the new route can take over from the container's
labels (1000) without removing them first. nginx now reloads for a
changed virtual host instead of restarting.

Assisted-by: Claude:opus-5-5
2026-11-17 12:19:50 +04:00
35bc42b01b
crawler: use the tool's own flake instead of a copy of the script
All checks were successful
nixos / nixos (push) Successful in 21s
crawler-alert.py was a byte-identical copy of the one in
asxpi/traefik-crawlers-statistics. That repository now has a package and
a NixOS module with the same three units and timers; iac takes it as a
flake input and keeps only the settings. The package also puts dig on
the script's path, which the Meta ASN check needs and lacked here.

Assisted-by: Claude:opus-5-5
2026-11-17 12:00:16 +04:00
2cde6aafbb
renovate: keep PR branches on top of main
Hosts deploy only a signed head of main. A Renovate PR merged
fast-forward keeps its signed commit as the head, which needs the branch
rebased onto main whenever main moves.

Assisted-by: Claude:opus-5-5
2026-11-17 11:57:46 +04:00
dd816bc219
comin: name its port as the security baseline sees it, fix pending
All checks were successful
nixos / nixos (push) Successful in 20s
The process listening on 4243 is .comin-wrapped, so the baseline flagged
it as unknown. After a restart comin reports an empty status until the
next commit arrives; count the head as pending only when it differs from
both the evaluated and the deployed commit.

Assisted-by: Claude:opus-5-5
2026-11-17 11:56:25 +04:00
0137dec4fb
nixos: comin deploys only signed commits
All checks were successful
nixos / nixos (push) Successful in 20s
The head of main must carry the admin's GPG signature or Renovate's SSH
signature (nixos/keys), so write access to the repository alone, such
as renovate-bot's API token, no longer reaches root on the hosts.

comin skips an unsigned head without a metric of its own, so a timer
exports whether the head is signed and whether it still waits for
evaluation; both alert.

Assisted-by: Claude:opus-5-5
2026-11-17 11:54:15 +04:00
29dcc8915a
ci: evaluate only, comin deploys
All checks were successful
nixos / nixos (push) Successful in 21s
comin on each host pulls main and switches, so the CI deploy job, its
SSH configuration and the known_hosts it used go. CI keeps evaluating
every host on every push and no longer holds a key to the servers;
SSH_DEPLOY_KEY can be removed from the repository secrets.

Assisted-by: Claude:opus-5-5
2026-11-17 11:39:40 +04:00
9290a4e181
nixos: add comin, hosts pull their configuration from main
All checks were successful
nixos / nixos (push) Successful in 3m22s
Each host runs comin, which polls main of this repository every minute,
builds nixosConfigurations.<hostname> on the host and switches to it.
A branch testing-<hostname> on top of main is applied with `test` to
that host alone. Prometheus scrapes comin over the private network, and
a failing fetch, evaluation, build or switch alerts after 15 minutes.

CI still deploys this commit, which starts comin; the CI deploy job and
its SSH key go in the next commit, once comin runs on both hosts.

Assisted-by: Claude:opus-5-5
2026-11-17 11:39:03 +04:00
2635b887c7
nixos: drop the rehearsal pair and other migration leftovers
All checks were successful
nixos / nixos (push) Successful in 1m3s
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
2026-11-17 11:11:33 +04:00
aebc919435
docs: TODO after the secret rotation; Postgres and Garage to services
Assisted-by: Claude:opus-5-5
2026-11-17 11:02:38 +04:00
c9ac900b3d
xray: restart only when its own config changes
All checks were successful
nixos / nixos (push) Successful in 1m15s
Xray restarted whenever anything in services' secrets file changed,
because its restart trigger was the whole sops file; the runner token
change just now restarted it. Xray may carry the admin's uplink. Tie the
restart to its own secret.

Assisted-by: Claude:opus-5-5
2026-11-17 11:00:57 +04:00
b7414c2ad1
runner: connect with UUID and token instead of registering
All checks were successful
nixos / nixos (push) Successful in 1m8s
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
2026-11-17 10:57:02 +04:00
0a54caa7d4
nixos: rotate the runner registration token
All checks were successful
nixos / nixos (push) Successful in 1m14s
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
2026-11-17 10:40:56 +04:00
f1baa4025c
nixos: rotate Forgejo's internal token and JWT secrets, Grafana's key
Some checks failed
nixos / nixos (push) Failing after 57s
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
2026-11-17 10:38:32 +04:00
c6431760bd
ci: wait for a running activation before switching a host
All checks were successful
nixos / nixos (push) Successful in 1m8s
nixos-rebuild activates through a transient unit with a fixed name. An
activation that started a long one-shot job waits for it; a deploy in
the meantime failed with "did you forget --ask-sudo-password?", twice
today. Wait up to 20 minutes for the earlier activation to finish.

Assisted-by: Claude:opus-5-5
2026-11-17 10:35:44 +04:00
b8cbf0fbf5
nixos: deploys do not kill a running backup or replica
Some checks failed
nixos / nixos (push) Failing after 1m15s
The daily replica that started at 06:09:59 was stopped 41 seconds later
by a deploy that changed its unit, and mailed a failure. Long one-shot
jobs keep running through a switch now; the next run uses the new unit.

Assisted-by: Claude:opus-5-5
2026-11-17 10:21:13 +04:00
6d9122eeff
main: the current setup only
Some checks failed
nixos / nixos (push) Has been cancelled
Both servers run NixOS. The Ansible code and the move itself leave main
for their own branches: `ansible` is the Debian/Ansible setup as it was
before the migration, `migration` keeps the plan and record, the data
scripts and everything else the move needed.

README and RESTORE describe the setup as it is now: NixOS, Podman,
sops, OpenTofu, the backup paths and hooks of the new layout. The
README carries the TODO list that MIGRATION.md had. The Forgejo
sanitising script stays, under hosts/rehearsal, with the rules for
rehearsing on restored production data in the NixOS README. Renovate
no longer looks at Ansible files.

Assisted-by: Claude:opus-5-5
2026-11-17 10:08:40 +04:00
168fd2ecb9
Merge branch 'nix'
All checks were successful
nixos / nixos (push) Successful in 34s
Assisted-by: Claude:opus-5-5
2026-11-17 10:06:16 +04:00
e27baf32ee
replica: give rclone a home directory
All checks were successful
nixos / nixos (push) Successful in 33s
rclone looked for one and logged three errors per bucket on every run,
though its remotes come from the environment.

Assisted-by: Claude:opus-5-5
2026-11-17 10:06:13 +04:00
c543214c20
Merge branch 'nix': quieter access-file alert
All checks were successful
nixos / nixos (push) Successful in 1m19s
Assisted-by: Claude:opus-5-5
2026-11-17 09:59:55 +04:00
23b9bede43
monitoring: no "Access files changed" alert for a deploy
All checks were successful
nixos / nixos (push) Successful in 35s
On NixOS an activation rewrites accounts and authorized_keys whenever
the configuration changes them, so every such deploy fired the alert
and resolved it minutes later. Each host now records when it last
activated a configuration (nixos_activation_timestamp_seconds, written
on every deploy and boot), and the rule ignores changes within 20
minutes of one. A change outside a deploy, which on these hosts can only
be a hand edit, still fires.

Assisted-by: Claude:opus-5-5
2026-11-17 09:59:51 +04:00
fd5c891f5e
Merge branch 'nix'
All checks were successful
nixos / nixos (push) Successful in 1m14s
Assisted-by: Claude:opus-5-5
2026-11-17 09:46:29 +04:00
3edcdce243
docs: point the NixOS README at the OpenTofu config and state
All checks were successful
nixos / nixos (push) Successful in 33s
Assisted-by: Claude:opus-5-5
2026-11-17 09:46:26 +04:00
bb010c0bea
Merge branch 'nix': OpenTofu naming, state and Loki buckets
Some checks failed
nixos / nixos (push) Failing after 55s
Assisted-by: Claude:opus-5-5
2026-11-17 09:42:57 +04:00
796331815d
tofu: rename from terraform, state in its own bucket, Loki buckets
All checks were successful
nixos / nixos (push) Successful in 34s
The infrastructure is applied with OpenTofu; name it so. terraform/
becomes tofu/, the files end in .tofu (OpenTofu 1.8+ prefers them), the
local variables file is secrets.auto.tfvars, and both servers carry
managed_by=opentofu (an in-place label change).

The state moved to new buckets asxpio-tofu-main/-repl, key
tofu/state/tofu.tfstate, with `tofu init -migrate-state`; a plan against
it shows no changes. The old asxpio-terraform-* buckets stay, renamed
in the config with moved blocks, until the new state has been used for
a while.

asxpio-loki-main, created by hand, is adopted with an import block, and
a new asxpio-loki-repl in fsn1 receives it in the daily replica, which
now also copies the new state bucket instead of the old one.

What keeps the Terraform name is OpenTofu's own: the `terraform {}`
block and .terraform.lock.hcl.

Assisted-by: Claude:opus-5-5
2026-11-17 09:42:53 +04:00
91a274ee34
Merge branch 'nix': Phase 2 record
Assisted-by: Claude:opus-5-5
2026-11-17 09:31:27 +04:00
e33cb4ad75
docs: asxpio-ops is on NixOS; Phase 2 record and TODO
Both servers run NixOS and deploy from main through CI. Record the ops
conversion (18.5 minutes of downtime, WireGuard back with the first test
activation, dead-man reboot not needed) and what is left: asxpio's
healthcheck branch, /old-root and the snapshots after a week, the
rehearsal server, Phase 3.

Assisted-by: Claude:opus-5-5
2026-11-17 09:31:23 +04:00