Manage your GitHub repositories as code using OpenTofu and the GitHub provider.
This repository contains OpenTofu configuration that manages GitHub repositories for the terlar user. It uses:
- OpenTofu for infrastructure as code
- terraform-backend-git for state storage
- GitHub provider for repository management
- first-ci-kit for CI/CD pipeline generation
State is stored in a Git repository (terlar/terraform-state) using the terraform-backend-git backend with AES256 encryption.
Add these secrets to your GitHub repository:
TF_STATE_PASSPHRASE- Passphrase used for encrypting the terraform state
nix develop
direnv allownix run . -- import # Import existing repositories
nix run . -- plan # Plan changes
nix run . -- apply # Apply changesThis configuration manages the following repositories (all public, non-fork):
archbox, base16-vim-powerline, box, curio, dev-flake, docker-dev-tools, docker-nix, docker-skype-pulseaudio, docker-spotify-pulseaudio, dotfiles, emacs-config, emacs-find-project, evil-stateful, exercism-workspace, first-ci-kit, first-ci-kit-demo, fish-farm, fish-plug, fish-tank, formatter, formatter-date, formatter-number, fry, indent-info.el, menu, mux, nix-config, nix-service-monorepo, nix-terraform, org-mode, pkgbuilds, pre-commit-treefmt-bug, resume, sam-playground, terlar.github.io, vim-ref-fish, vimfiles, zshfiles
All repositories have the following branch protection rules on main:
- Admins enforced
- 1 required approval
- Required status check:
Terraform(strict mode) - Force pushes blocked
- Signed commits required