Commit graph

7 commits

Author SHA1 Message Date
steffen
c45a603d1c replace deploy-rs CI with Comin pull-based deployment
- Add Comin service for cryodev-main (polls git repo, auto-deploys)
- Fix cryodev-pi Comin URL (cryodev-server.git -> cryodev.git)
- Remove deploy-rs from CI pipeline (was insecure with shared runner)
- Remove deploy SSH key, root SSH login, sudo rules for gitea-runner
- Revert PermitRootLogin back to 'no'
- CI now only runs flake-check + build (no deploy)
- Deployment happens via Comin (both hosts poll and self-deploy)
2026-03-14 14:43:15 +01:00
steffen
ed806bf5fb fix CI deploy: use global SSH config for deploy-rs
The nix-daemon runs as root and cannot access the gitea-runner user's
~/.ssh directory. Solution: write the deploy key and SSH config to
/etc/deploy/ and /etc/ssh/ssh_config.d/ which are readable by all
users including the nix-daemon.

- Deploy key is written to /etc/deploy/key (cleaned up after deploy)
- SSH config in /etc/ssh/ssh_config.d/deploy.conf (cleaned up after)
- Minimal NOPASSWD sudo rules for gitea-runner to manage these files
- Reverts local deploy approach, back to deploy-rs over SSH
2026-03-14 14:35:56 +01:00
steffen
e2e87d5694 switch CI deploy to local nixos-rebuild instead of deploy-rs over SSH
Runner runs on the same server it deploys to, so SSH to itself was
unnecessarily complex. Now builds locally and activates directly.

- Replace deploy-rs SSH workflow with local build + switch
- Add NOPASSWD sudo for gitea-runner to run nix-env and
  switch-to-configuration (required for local deployment)
- Remove SSH key setup from deploy workflow
2026-03-14 14:33:06 +01:00
steffen
8b467f071f fix deploy-rs: set sshUser=root explicitly, fix host key verification
Some checks failed
Deploy / flake-check (push) Successful in 35s
Deploy / deploy-cryodev-main (push) Has been cancelled
Deploy / create-release (push) Has been cancelled
Deploy / build-pi-images (cryodev-pi) (push) Has been cancelled
deploy-rs was using 'gitea-runner' as ssh_user because the runner
process runs as that user. Set sshUser=root at the node level.
Also add StrictHostKeyChecking=accept-new as fallback for host key.
2026-03-14 14:26:51 +01:00
steffen
3f07d27c78 fix deploy-rs: use SSH port 2299 and user steffen instead of root
deploy-rs was configured with default port 22 and user root, but
SSH runs on port 2299 and root login is disabled. Also fix ssh-keyscan
in the deploy workflow to use the correct port.
2026-03-14 14:11:08 +01:00
steffen
14d02a0c57 fix CI: use runs-on host, remove install-nix-action
Some checks failed
Deploy / flake-check (push) Successful in 45s
Deploy / deploy-cryodev-main (push) Failing after 1s
Deploy / build-pi-images (cryodev-pi) (push) Failing after 57s
Deploy / create-release (push) Has been skipped
Runner has label 'host' not 'docker'. Jobs were stuck in 'waiting to
run' because no runner matched the docker label. Also removed the
cachix/install-nix-action steps since Nix is already available on the
host runner.
2026-03-14 13:56:31 +01:00
steffen
8d7794a08c restructure CI/CD: flake-check gates all deployments
Some checks are pending
Deploy / flake-check (push) Waiting to run
Deploy / deploy-cryodev-main (push) Blocked by required conditions
Deploy / build-pi-images (cryodev-pi) (push) Blocked by required conditions
Deploy / create-release (push) Blocked by required conditions
Consolidate 4 separate workflows into 2:

- ci.yml (pull_request): flake-check -> build-hosts
- deploy.yml (push to main): flake-check -> deploy + build-pi-images

Previously, deploy and build-pi-image ran on push to main without
any checks. Now flake-check must pass before anything gets deployed
or built.
2026-03-14 13:52:21 +01:00
Renamed from .forgejo/workflows/build-pi-image.yml (Browse further)