--- type: journal project: homelab date: 2026-09-18 tags: - operations - homelab - troubleshooting - gitea - nix - ci-cd - dns - docker --- # Daily Journal: 2026-09-18 ## Wins ### CI/CD Standardization & Git Mirror Resilience Hardened the local developer platform and forge infrastructure across `homelab-core` and Gitea: - Eliminated dynamic CI toolchain initialization delays, reducing pipeline validation runtime from >5 minute hangs to 16 seconds. - Restored continuous outbound Git mirroring between self-hosted Gitea repositories and GitHub upstreams. --- ## Incidents & Debugging - [Remediation: Gitea Actions CI Build Hang on Nix Installation](../debug/2026-09-18-gitea-actions-nix-runner-fix.md) - **Issue**: The `validate` workflow job in `homelab-core` hung indefinitely (>5 minutes) at the `Install Nix` step, blocking all pull requests and pushes. - **Root Cause**: `DeterminateSystems/nix-installer-action` attempted multi-user installation requiring systemd sockets absent in Gitea's `act_runner` container, while targeting GitHub API endpoints instead of Gitea. - **Remediation**: Switched the workflow job container to `nixos/nix:latest`, configured `safe.directory`, and verified execution dropped to 16 seconds. - [Incident RCA: Gitea GitHub Mirror Push Failure & Docker DNS Forwarder Resolution](../debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.md) - **Issue**: Gitea push mirrors failed with `fatal: unable to access 'https://github.com/...': Could not resolve host: github.com`. - **Root Cause**: The embedded Docker DNS resolver (`127.0.0.11`) inside the container lost synchronization with host upstream nameservers following network reconfiguration, returning `SERVFAIL`. - **Remediation**: Restored container network forwarding and verified successful push synchronization across all repositories. --- ## Mistakes and Lessons Learned ### Pre-Baked CI Images vs Dynamic In-Job Installers Dynamic package and toolchain installers in containerized runners introduce unpredictable runtime dependencies on host PID 1/systemd state. Declaring explicit pre-baked container images (`container: { image: ... }`) eliminates external install flakiness and speeds up pipeline turnaround drastically. ### Container Safe Directory UID Mappings When container runners mount workspace volumes across differing user IDs, Git strictly rejects repository operations unless `git config --global --add safe.directory "$GITHUB_WORKSPACE"` is declared prior to running flake or git commands.