iac/nixos/secrets/rehearsal.yaml
Sergei Poljanski 8bd9c653f7
nixos: describe asxpio-services as a NixOS system
asxpio-services is to move from Debian with Docker to NixOS with
Podman. This is the target system; nothing is switched over yet.

One flake holds what was spread over cloud-init, Ansible roles and
hand-made units: network and WireGuard, users and SSH restrictions,
firewall, the weekly image prune, and the four container stacks
(Paper and Fossils Minecraft, SillyTavern, the Forgejo runner), each
as a systemd unit under Podman. The runner keeps running as a
container and starts jobs through Podman's Docker-compatible socket.

Secrets (WireGuard keys, RCON and CurseForge keys) are encrypted with
sops for the admin's age key and the server's SSH host key, so the
repository holds no plaintext secret and CI needs none of them.

Containers that own data wait for /opt/.restored. On a freshly
installed disk a game server would otherwise generate a new world
exactly where the restore is about to land.

Tried on a throwaway server (.#rehearsal): install with nixos-anywhere
keeping a given host key, secret decryption, all stacks, a real Paper
server stopping with a full save, what CI jobs need from the engine
(short image names, the nix-store volume, service containers by name,
a kaniko build, the socket inside a job), an update over SSH and a
reboot.

migration/ has the scripts that move the data through object storage,
and a workflow builds the system on every push and switches the host
on main.

Assisted-by: Claude:fable-5-2
2026-11-12 23:52:59 +04:00

29 lines
2.1 KiB
YAML

wireguard:
private_key: ENC[AES256_GCM,data:W1EAsnxGwL0zVZbaK/9swOQF2w1fiLqBO5Tx9UVCiB2zq0Q7vmjylhZFJmo=,iv:4JykRMiIkaPqaLU3VSgqdmdoSBLm3QNy1G5NhYVhGYU=,tag:rfhIGFD2K7PwqiBJFEa1dQ==,type:str]
preshared_key: ENC[AES256_GCM,data:LyvSVY2lNoB0/TEeB4jTAW8k/rrP+xsiiyEpbe0RCNk468GTiKiqRHXMxUc=,iv:L8ndcxBPBwSDUCZMuoyz2d6tThy7ldiJ0kpYO2odcwI=,tag:4THzv7cMsDBhsWmSlJ0t+w==,type:str]
minecraft_fossils:
env: ENC[AES256_GCM,data:Ofyyf7uidBvn9hURkFbaPtz/iL76uXuo3Yx7zlS/steY6mMmIXzzvo1heKNn,iv:eyJOjcyN4ojMaAApsjbDipv3vPpI2HVS1UGeaW9iZCk=,tag:zoDyalaEazMcB/g6voMZvg==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWVWRGL1RCeUZqY0ZERkVv
aEowMkE5V2dUd3N3ZXowMkc0RUtrZkFyVlYwCjRQNWszeVN6eVFTOVdiMVRVQnRj
dVNOTFZlNVdIMHVuMGFtUlpaQUhqdW8KLS0tIDRGWm1LUEVvV2lEZTBzTXcycHpl
c25lblJvZmRFdlN5Z1VPRmRNayttNzAKAFhBDdsbpgYImB6ZtnkHm4ffC0R35IJx
3jIYvz32vnf2hEtBdyfQ+IDIwZso8OXx5aetoG4LjgRk/I8ed0jsjQ==
-----END AGE ENCRYPTED FILE-----
recipient: age19xvmm6j3h2u6mc3w6k65ufry4p5aa5lwu96p55h3e42p9wfzwc0qp2w7pk
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiOGcxZEF6TStSSG1qdEFQ
dldrbXlpSTJJYzh0T0JZazZzelp2dWVITzNRCjU2cmlrdmFqb2xWaEl1d1RqY2N5
SklpbEIrZkJpZHlLcC9nMWFQNVBOU2sKLS0tIGJEcmZFeE0yNkNEZDU4SUNiTUg1
UXNyM05BRHVuTEVjT0lMQUp3VnBRdjgKQJDJ1ZMlTM7C7VH1Vt2+D/H69BZmYqv4
oIGm0ODdeKzfZx8cj/7XT4cmMrbM/wWjqjLzpCAAuX2Rqd4aLbZPqA==
-----END AGE ENCRYPTED FILE-----
recipient: age1wdgvn9yjjjgqq0h7pysy9e0e74qag4v6t82qyspk2685c550vq3spg0yjj
lastmodified: "2026-11-12T12:29:11Z"
mac: ENC[AES256_GCM,data:6qcQN5WIcmvEK3Ywcf8uXyHslU7PM0nFDJTy45ajgenwX5ajay+ZyvO9B/+icKa3bGonIK/K+rUdFPDMvlzfZ+SDdEwD+oQa8JqtNP1h16wauSbZO+9aZuKZBewbCos4FK4/I5PC+48wq87k9MRiM9FsKr/J4H/YfsC3EoGF1XU=,iv:3aBX/UJM8kIeX3mmZ+UFsmw07Xs6Dl/SFOQG9C5ZKLM=,tag:td8XDy0HtClpJbQiKtvbWA==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.3