- Nix 68.2%
- HCL 16.7%
- Python 12.2%
- Shell 2.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
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 |
||
| .forgejo/workflows | ||
| nixos | ||
| tofu | ||
| .gitignore | ||
| known_hosts | ||
| README.md | ||
| renovate.json | ||
| RESTORE.md | ||
asxp.io infrastructure
Two Hetzner Cloud servers running NixOS, described by OpenTofu.
tofu/: servers, network, firewalls, DNS, Object Storage buckets (OpenTofu, applied by hand;tofu/README.md)nixos/: the whole system of each server (one flake;nixos/README.md)RESTORE.md: restoring data from the backups
Branches: main is what runs. ansible is the Debian/Ansible setup as
it was before the move to NixOS (2026-11-16), migration the move
itself: its plan and record, the data scripts and the rehearsal rules.
Servers
| Server | Size | Runs |
|---|---|---|
| asxpio-ops | CX23: 2 vCPU, 4 GB | WireGuard hub, Traefik, Forgejo (+ registry), Postgres, Garage, monitoring; app stacks deployed from their own repos |
| asxpio-services | CX43: 8 vCPU, 16 GB | Forgejo Actions runners, Minecraft (Paper), SillyTavern, XMPP (asxp.io), Xray |
Administration only over WireGuard (10.20.0.0/24) or the private network
(10.10.0.0/20). Both servers are billed below today's list price: never
delete or recreate them, reinstall in place (nixos/README.md).
Changing something
Edit nixos/, push a branch (CI evaluates every host), merge to main:
.forgejo/workflows/nixos.yaml builds each host on itself and switches
to it, ops first. Only units whose definition changed restart. Undo
with nixos-rebuild switch --rollback on the host.
Versions are pinned (flake.lock, image tags); Renovate opens a PR per
bump and updates flake.lock weekly.
Things to know:
- The runner executes the deploy. A change to it restarts it mid-job: the change lands, the job shows as cancelled, the next run confirms.
- App stacks (asxpio, datacenterbingo, blog, czsk, vhpbot) are Podman
containers that their own repositories deploy with
docker composeas userdeploy.dockerandpodmantalk to the system Podman for every admin. - Your workstation's uplink may run through Xray on services: never stop it without another path.
Monitoring
Grafana at https://gf.asxp.io (WireGuard only). Dashboards and the 33
alert rules are provisioned from nixos/hosts/asxpio-ops/monitoring/;
change them there, not in the UI. Alerts mail asxpio.alertEmail.
- Metrics: Prometheus on ops scrapes both hosts, 90 days.
- Logs: Alloy ships the journal, container logs and Traefik's access
log to Loki (bucket
asxpio-loki-main), 2 years. - Probes: blackbox checks every site and TCP/TLS service from ops.
- Security baseline: every host reports its WireGuard peers, devices
on the private network, accounts, listening ports and privileged
containers; anything not declared in the config alerts. Each service
declares what it expects (
asxpio.security). SSH logins show the same summary.
Backups
Nightly restic on each host (ops 03:30, services 04:15 UTC) into
restic/<host> in asxpio-backups-main (hel1) and asxpio-backups-repl
(fsn1); a failed run mails. A daily replica (services, ~06:00) copies
asxpio-backups-main (minus restic/), asxpio-tofu-main,
asxpio-loki-main and k8s-asxpio-main to their fsn1 twins. Details
and restores: RESTORE.md.
Secrets
Service secrets are in nixos/secrets/<host>.yaml, encrypted with sops
for the admin's age key and each host's SSH host key; the hosts decrypt
them at boot. CI holds only SSH_DEPLOY_KEY. Keep a copy of the admin
age key (~/.config/sops/age/keys.txt) outside this machine.
TODO
- From 2026-11-24, if nothing came up:
rm -rf /old-rooton both hosts (Debian and its leftovers: Postgres 17/18 rollback volumes on ops), then delete the snapshotspre-nixos-2026-11-17andasxpio-ops-pre-nixos-2026-11-17in the Hetzner console. - Remove the repository secret
ANSIBLE_VAULT_PASSWORD(Forgejo → iac → Settings → Actions → Secrets). - Empty and remove the old state buckets
asxpio-terraform-main/-repl(legacy_state_*intofu/s3.tofu) once the new state has been in use for a few weeks. - Rotate the secrets that sat in the old repository history:
Forgejo's
INTERNAL_TOKENand JWT secrets, the runner token; give Grafana its ownsecret_key. - Move the app stacks to their own flakes on asxpio-services, one at a time (blog → czsk → datacenterbingo → asxpio → vhpbot).