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
35 lines
913 B
YAML
35 lines
913 B
YAML
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
|