docs: how to build, restore and migrate; ci: evaluate NixOS hosts

Anyone with the repo and the secrets should be able to rebuild the
servers. nixos/README.md covers building from nothing, reinstalling in
place and the rehearsal pair; RESTORE.md covers restoring from the
restic backups; MIGRATION.md is the plan and runbook for moving
production over, with what was learned on the test servers.

CI evaluates every host on a push under nixos/. It does not deploy yet:
no production host runs NixOS.

Assisted-by: Claude:fable-5-2
This commit is contained in:
Sergei Poljanski 2026-11-16 22:59:59 +04:00
commit 933b086bb1
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -0,0 +1,35 @@
name: nixos
# Every push: evaluate each host, so a broken config never reaches main.
# Deploying from here is added when the first host runs NixOS
# (MIGRATION.md, step 4); until then hosts are switched by hand.
on:
push:
paths:
- 'nixos/**'
- '.forgejo/workflows/nixos.yaml'
workflow_dispatch:
jobs:
evaluate:
runs-on: nix-latest
env:
NIX_CONFIG: |
experimental-features = nix-command flakes
build-users-group =
sandbox = false
steps:
- name: Prepare container for actions
run: nix-env -iA nixpkgs.nodejs_22
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Evaluate
working-directory: nixos
run: |
for host in asxpio-ops asxpio-services rehearsal; do
nix eval --raw ".#nixosConfigurations.$host.config.system.build.toplevel.drvPath"
echo
done