nixos: describe both servers as NixOS systems

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
This commit is contained in:
Sergei Poljanski 2026-11-16 22:59:59 +04:00
commit be68c5adef
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -0,0 +1,39 @@
wireguard:
private_key: ENC[AES256_GCM,data:PUOlyBRhcFjpCkRY1iB/VieX8s3fXVJgqQCkB93TXdRtRHS99tvHU7cnRdI=,iv:qIvsC5yfdskx0z5H5mvCGr5C1KpZ+wENwT4tfQE9Ptw=,tag:YtswD9X9UJuCjlgKywoaxQ==,type:str]
psk:
asxpio-ops: ENC[AES256_GCM,data:IN6LX/lq9Rlxe8dMrYKO3Jm0T7AWJ/W8P4NVgKVNa0E/IELSOO4GvmswUvE=,iv:cO4RPGl8twGLb3rta/RnsjrPR2qIiAITdbLg3sD6Qgc=,tag:aWOeGWO6k+Q7wzS8HdD/mA==,type:str]
xray:
config: ENC[AES256_GCM,data:V+52wflRQ3EuyH3nQHBkU9XvllsqfLlbeeW7tFcVk35s6Umr9pFqXj7ABEmzJYG190cEigybYvv3uiAdx+HNaVUCXbQ3P4YFLj033V5ZuZapLVqQAepeeoUVnAVJ6uxbvauIYajgx09G/XyG/N6K8BhSoHRqbGHf2xZ49r+N/t9LTR0c4mxfgUY0pBBI4bRjrKlXSd5cnNa67/auLt/o5A6AZ7KedXgtePvlTDc9WFlpzC5T,iv:QjyBitOv6z4d0Muj+sLiCmvkyDElCu/oDed4peKwxpw=,tag:D390KdRfu0zenvgNpei2DA==,type:str]
restic:
password: ENC[AES256_GCM,data:nYUVRll/aDrEolaf/m8U,iv:eRGdDQcBP3lxxqI2Tqun7I4c9FfWQdXUdrnhStTD1Qo=,tag:pRuYgj2CXMZyYwuRKgVP8Q==,type:str]
s3:
access_key: ENC[AES256_GCM,data:wN0B8YZs0WuA7JlQWc9s,iv:4Cwgu5kwAbXlnTnkVnH0Iom7cgUWqVcAa/ifqainLTY=,tag:GLEZn8UuGv8UPpy/4boKiw==,type:str]
secret_key: ENC[AES256_GCM,data:RkbeZCy83n2VVOiC+g37,iv:dr6qqVJ5HrSG4YLZPs+UFGnXs0oyrBMCEqlR31z6i5I=,tag:UB0LueCNx4g2bhPWHbMpbQ==,type:str]
alert:
smtp_user: ENC[AES256_GCM,data:qFePxfCUu6lq4Ev783+Z,iv:Q9/5DN8mFJ/A/39nWv0MuokfZ4AdJ+mJlxkyxNN45jQ=,tag:Jsuce5wbB6FPruhrtQoU3Q==,type:str]
smtp_password: ENC[AES256_GCM,data:7B+Hz41HPjQROsSdxtcL,iv:Ntg1uMkPg4OmY9NYBmXrwENjdkSrQmMdfqJAH0GrNV4=,tag:jeHegNY72drhq6MfQany3A==,type:str]
recipient: ENC[AES256_GCM,data:6ToWFpKc3eZPIN8ycVCIxkdsHbiq4A==,iv:YSSQ7XUPEqnebKRJPMTfUBy4Rtt8Gro3igOS0vCQMrs=,tag:FDP27ufUhai3uqh+8/SFOw==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4ZmduYjNXZEorcmxwNUNx
bmt3NGU5UmZhMG0xY0JUWHRnUVhYWU8yeW5FClNmY3k2cnN5K3pFMGV6V1l4N3pM
VlEza0JuM0F4QkVSYmQ3UWlRTktPV2MKLS0tIHB1ZExEdkVVWmt2YmZaaWY2SXFY
czhrYzVHeDZTNnZrc1A1VCtYQmdILzQKwQo1ss84RRm25ZPA/dZEcyPZm2TrCzmQ
YV4AmymV/QhuL4CokynHpxx2jNna2MTbdqQNET1PYCczoU7+lkisAw==
-----END AGE ENCRYPTED FILE-----
recipient: age19xvmm6j3h2u6mc3w6k65ufry4p5aa5lwu96p55h3e42p9wfzwc0qp2w7pk
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBb1NjdWpiZzI2Z1cwWmdU
NDlwV3dRN3VsWVBMdzIzeWVuNXc4NGNlY1JnCkFwcSsyUWxVdHNhUTdUYXNQNER2
MXJ5S2lSeHFGamVZWWp4RjN1TG40SGsKLS0tIGVrZFJlUUFwZnNvRm5RTlBHVlpR
UGlGRS9Ca0hnekY4SjdTaVFCbFppQTAKhLgJ6CMctPkVxO3og69tLRAO9DRm/5W9
cdAX8w7/jxpECelWZWUisIN0qvb/42I86CfdQAqTLknL02pnLNYW7A==
-----END AGE ENCRYPTED FILE-----
recipient: age1au6f8m6l245ddrunqf2a62xprnlevn9yrducynlay2tgknfxeeusj94j5l
lastmodified: "2026-11-16T18:04:55Z"
mac: ENC[AES256_GCM,data:zNzmbqxWVTycXWHKmBX3IFCSK5cQ4XeZr859ezDWrR/EZFOHHCGGV+N3GqYwDtrHK832Ovs69S6WgSI0SwUqeC3cfxlauym0VdPq1kl8FcON1nbK51dueR3YuxIxvCmtQJy9BNmgmAMgnhldCvtPnQW3ELS/DViLF0iTGKBzLAg=,iv:0KSj8ct+R4GKYZ6/5VhBWmIiaryMzM8n/5ccUyiPpGQ=,tag:C/dDDmv7MBIltRfrUiFToQ==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.3