Adds terraform/ and nix/hosts/cc-ci-hetzner/ to provision cc-ci on Hetzner Cloud as an alternative to the Incus cc-nix-test VM (see cc-ci-plan/plan-cc-ci-hetzner-terraform.md).
What is in this PR
terraform/ — 7 files:
versions.tf — hcloud provider pinned at 1.64.0 (OpenTofu/Terraform compatible)
variables.tf — server type, location, image, SSH key, name
networking.nix — infect-generated static networking (update IP per README when re-provisioning)
configuration.nix — imports shared cc-ci modules + hardware; adds ports 80+443 for public IP
flake.nix — adds nixosConfigurations.cc-ci-hetzner (parallel to existing cc-ci Incus host).
Verification (throwaway run 2026-05-31)
terraform apply → cpx32 server in nbg1 created in 17 s (Hetzner ID 134464512, IP 168.119.126.100)
nixos-infect → NixOS 24.11.719113.50ab793786d9 (same nixpkgs pin as the flake)
nixos-rebuild build --flake .#cc-ci-hetzner → exit 0 on the server (131 derivations built; all cc-ci modules: tailscale, drone, drone-runner, bridge, dashboard, harness, swarm, abra, proxy, secrets, …)
terraform plan → No changes (idempotent)
terraform destroy → server + SSH key deleted; billing stopped
Operator-pending step
Full nixos-rebuild switch (Stage 2) needs the bootstrap age key at /var/lib/sops-nix/key.txt. The flake evaluates and builds without it; activation of sops-managed secrets requires it. See terraform/README.md §Stage 2.
Decisions recorded (plan §7)
v1: keep sops wildcard cert (no ACME change); evaluate ACME-on-public-IP as follow-up
cpx31 retired in nbg1; using cpx32 (same spec: AMD 4 vCPU / 8 GB x86)
Debian 12 preferred over Ubuntu 24.04 as nixos-infect base
Parallel cc-ci-hetzner host during transition; make it canonical cc-ci after cutover
Do not merge — throwaway verification only; real cutover is a separate operator step.
## Summary
Adds `terraform/` and `nix/hosts/cc-ci-hetzner/` to provision cc-ci on Hetzner Cloud as an alternative to the Incus `cc-nix-test` VM (see `cc-ci-plan/plan-cc-ci-hetzner-terraform.md`).
## What is in this PR
**`terraform/`** — 7 files:
- `versions.tf` — hcloud provider pinned at `1.64.0` (OpenTofu/Terraform compatible)
- `variables.tf` — server type, location, image, SSH key, name
- `main.tf` — `hcloud_ssh_key` + `hcloud_server` (cpx32, debian-12, nbg1, user-data)
- `outputs.tf` — server IPv4, ID, SSH connect command
- `user-data.sh` — nixos-infect pinned at `40f62a680bb0e8f2f607d79abfaaecd99d59401c` (2026-03-22)
- `.gitignore` — tfstate + auto.tfvars + .terraform/ (secrets/state never committed)
- `.terraform.lock.hcl` — provider SHA pins (analogous to flake.lock)
- `README.md` — full apply + Stage 2 instructions
**`nix/hosts/cc-ci-hetzner/`** — 3 files:
- `hardware.nix` — nixos-infect-generated hardware (GRUB+EFI, qemu-guest, /dev/sda1 ext4)
- `networking.nix` — infect-generated static networking (update IP per README when re-provisioning)
- `configuration.nix` — imports shared cc-ci modules + hardware; adds ports 80+443 for public IP
**`flake.nix`** — adds `nixosConfigurations.cc-ci-hetzner` (parallel to existing `cc-ci` Incus host).
## Verification (throwaway run 2026-05-31)
- `terraform apply` → cpx32 server in nbg1 created in 17 s (Hetzner ID 134464512, IP 168.119.126.100)
- nixos-infect → NixOS `24.11.719113.50ab793786d9` (same nixpkgs pin as the flake)
- `nixos-rebuild build --flake .#cc-ci-hetzner` → **exit 0** on the server (131 derivations built; all cc-ci modules: tailscale, drone, drone-runner, bridge, dashboard, harness, swarm, abra, proxy, secrets, …)
- `terraform plan` → **No changes** (idempotent)
- `terraform destroy` → server + SSH key deleted; billing stopped
## Operator-pending step
Full `nixos-rebuild switch` (Stage 2) needs the bootstrap age key at `/var/lib/sops-nix/key.txt`. The flake evaluates and builds without it; activation of sops-managed secrets requires it. See `terraform/README.md` §Stage 2.
## Decisions recorded (plan §7)
- v1: keep sops wildcard cert (no ACME change); evaluate ACME-on-public-IP as follow-up
- `cpx31` retired in nbg1; using `cpx32` (same spec: AMD 4 vCPU / 8 GB x86)
- Debian 12 preferred over Ubuntu 24.04 as nixos-infect base
- Parallel `cc-ci-hetzner` host during transition; make it canonical `cc-ci` after cutover
**Do not merge** — throwaway verification only; real cutover is a separate operator step.
Adds terraform/ (hcloud provider, cpx32/nbg1/debian-12) and a new
nix/hosts/cc-ci-hetzner/ flake host to provision the cc-ci server on
Hetzner Cloud as an alternative to the Incus cc-nix-test VM.
Stage 1 (Terraform): creates a cpx32 server (4 vCPU / 8 GB / x86 AMD,
Nuremberg), runs nixos-infect (pinned rev 40f62a6, 2026-03-22) to convert
Debian 12 → NixOS 24.11, and reboots into bare NixOS.
Stage 2 (manual, per terraform/README.md): clone cc-ci --recursive,
provision the bootstrap age key, then `nixos-rebuild switch --flake
.#cc-ci-hetzner`.
Verified (throwaway run 2026-05-31, server 134464512, 168.119.126.100):
- terraform apply: cpx32 in nbg1 created in 17 s
- nixos-infect: NixOS 24.11.719113.50ab793786d9 (same nixpkgs pin as flake)
- nixos-rebuild build --flake .#cc-ci-hetzner: exit 0 on server
(131 derivations; all cc-ci modules: tailscale, drone, drone-runner,
bridge, dashboard, harness, swarm, abra, proxy, secrets)
- terraform plan: no changes (idempotent)
- terraform destroy: server + SSH key removed
Age key step (plan §4 Stage 2): operator-pending. Full switch/convergence
requires bootstrap age key at /var/lib/sops-nix/key.txt. Flake builds
without it; activation needs it.
No secrets committed: HCLOUD_TOKEN via env, tfstate gitignored,
networking.nix contains throwaway IP (update per README for production).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Created by assistant + patched with root authorized keys so nixos-rebuild
does not lock out SSH access.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closing as superseded. The Hetzner migration is complete — the cc-ci server runs on Hetzner now, and nix/hosts/cc-ci-hetzner landed directly on main 2026-05-31 (4237cc0 + later fixes), newer than this branch. The one unmerged piece — the terraform/ provisioning scaffolding — has been salvaged onto current main as IaC-of-record in commit e37a7df. This branch is hundreds of commits behind and unmergeable; nothing left to merge.
Closing as **superseded**. The Hetzner migration is complete — the cc-ci server runs on Hetzner now, and nix/hosts/cc-ci-hetzner landed directly on main 2026-05-31 (4237cc0 + later fixes), newer than this branch. The one unmerged piece — the terraform/ provisioning scaffolding — has been salvaged onto current main as IaC-of-record in commit e37a7df. This branch is hundreds of commits behind and unmergeable; nothing left to merge.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Adds
terraform/andnix/hosts/cc-ci-hetzner/to provision cc-ci on Hetzner Cloud as an alternative to the Incuscc-nix-testVM (seecc-ci-plan/plan-cc-ci-hetzner-terraform.md).What is in this PR
terraform/— 7 files:versions.tf— hcloud provider pinned at1.64.0(OpenTofu/Terraform compatible)variables.tf— server type, location, image, SSH key, namemain.tf—hcloud_ssh_key+hcloud_server(cpx32, debian-12, nbg1, user-data)outputs.tf— server IPv4, ID, SSH connect commanduser-data.sh— nixos-infect pinned at40f62a680bb0e8f2f607d79abfaaecd99d59401c(2026-03-22).gitignore— tfstate + auto.tfvars + .terraform/ (secrets/state never committed).terraform.lock.hcl— provider SHA pins (analogous to flake.lock)README.md— full apply + Stage 2 instructionsnix/hosts/cc-ci-hetzner/— 3 files:hardware.nix— nixos-infect-generated hardware (GRUB+EFI, qemu-guest, /dev/sda1 ext4)networking.nix— infect-generated static networking (update IP per README when re-provisioning)configuration.nix— imports shared cc-ci modules + hardware; adds ports 80+443 for public IPflake.nix— addsnixosConfigurations.cc-ci-hetzner(parallel to existingcc-ciIncus host).Verification (throwaway run 2026-05-31)
terraform apply→ cpx32 server in nbg1 created in 17 s (Hetzner ID 134464512, IP 168.119.126.100)24.11.719113.50ab793786d9(same nixpkgs pin as the flake)nixos-rebuild build --flake .#cc-ci-hetzner→ exit 0 on the server (131 derivations built; all cc-ci modules: tailscale, drone, drone-runner, bridge, dashboard, harness, swarm, abra, proxy, secrets, …)terraform plan→ No changes (idempotent)terraform destroy→ server + SSH key deleted; billing stoppedOperator-pending step
Full
nixos-rebuild switch(Stage 2) needs the bootstrap age key at/var/lib/sops-nix/key.txt. The flake evaluates and builds without it; activation of sops-managed secrets requires it. Seeterraform/README.md§Stage 2.Decisions recorded (plan §7)
cpx31retired in nbg1; usingcpx32(same spec: AMD 4 vCPU / 8 GB x86)cc-ci-hetznerhost during transition; make it canonicalcc-ciafter cutoverDo not merge — throwaway verification only; real cutover is a separate operator step.
Closing as superseded. The Hetzner migration is complete — the cc-ci server runs on Hetzner now, and nix/hosts/cc-ci-hetzner landed directly on main 2026-05-31 (
4237cc0+ later fixes), newer than this branch. The one unmerged piece — the terraform/ provisioning scaffolding — has been salvaged onto current main as IaC-of-record in commite37a7df. This branch is hundreds of commits behind and unmergeable; nothing left to merge.Pull request closed