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:
parent
be68c5adef
commit
933b086bb1
1 changed files with 566 additions and 3 deletions
35
.forgejo/workflows/nixos.yaml
Normal file
35
.forgejo/workflows/nixos.yaml
Normal 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
|
||||
Loading…
Reference in a new issue