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
This commit is contained in:
Sergei Poljanski 2026-11-17 11:11:33 +04:00
commit 2635b887c7
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
3 changed files with 56 additions and 380 deletions

View file

@ -1,6 +1,4 @@
# asxpio-services: CI runners, Minecraft, XMPP, Xray, SillyTavern.
# Services are added here as they move over from ../../ansible (see
# MIGRATION.md at the repo root); until then this is the base system only.
{ lib, ... }:
{
imports = [
@ -16,7 +14,7 @@
asxpio.publicIPv4 = lib.mkDefault "46.62.228.216";
networking.hostName = lib.mkDefault "asxpio-services";
networking.hostName = "asxpio-services";
networking.domain = "asxp.io";
asxpio.privateIPv4 = "10.10.0.20";
system.stateVersion = "26.05";

View file

@ -26,13 +26,7 @@ in
description = "Public half of xmpp_cert_sync/ssh_key in the ops secrets.";
};
options.asxpio.xmppCertSyncKeysExtra = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "Further keys allowed to push certificates (e.g. during a migration).";
};
config.users.users.root.openssh.authorizedKeys.keys = map (
key: ''restrict,from="10.10.0.10",command="${lib.getExe install}" ${key} xmpp-cert-sync''
) ([ config.asxpio.xmppCertSyncKey ] ++ config.asxpio.xmppCertSyncKeysExtra);
) [ config.asxpio.xmppCertSyncKey ];
}

View file

@ -23,7 +23,7 @@ key_pub=$(openssl pkey -in "$tmp" -pubout | sha256sum)
chmod 0644 "$tmp"
mv "$tmp" "$dir/$name.pem"
trap - EXIT
# Not running during a restore or on a rehearsal host: ejabberd reads the
# Not running during a restore: ejabberd reads the
# file at its next start
if podman container exists xmpp-ejabberd; then
podman exec xmpp-ejabberd ejabberdctl reload_config