mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
hosts/plover: refactor Gitea Terraform code
This commit is contained in:
parent
0ca614a8a0
commit
58adcd4047
@ -29,94 +29,48 @@ resource "gitea_public_key" "foodogsquared" {
|
|||||||
key = file("../../../../home-manager/foo-dogsquared/files/ssh-key.pub")
|
key = file("../../../../home-manager/foo-dogsquared/files/ssh-key.pub")
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "gitea_repository" "nixos-config" {
|
resource "gitea_repository" "personal_projects_from_github" {
|
||||||
username = gitea_user.foodogsquared.username
|
for_each = tomap({
|
||||||
name = "nixos-config"
|
hugo-theme-more-contentful = {
|
||||||
mirror = true
|
website = "https://foo-dogsquared.github.io/hugo-theme-more-contentful"
|
||||||
migration_clone_address = "https://github.com/foo-dogsquared/nixos-config.git"
|
interval = null
|
||||||
migration_service = "github"
|
}
|
||||||
migration_service_auth_token = var.github_clone_token
|
hugo-theme-contentful = {
|
||||||
migration_mirror_interval = "4h"
|
website = "https://foo-dogsquared.github.io/hugo-theme-contentful"
|
||||||
website = "https://foo-dogsquared.github.io/nixos-config"
|
interval = null
|
||||||
private = false
|
}
|
||||||
}
|
ansible-playbooks = {
|
||||||
|
website = null
|
||||||
resource "gitea_repository" "website" {
|
interval = null
|
||||||
username = gitea_user.foodogsquared.username
|
}
|
||||||
name = "website"
|
dotfiles = {
|
||||||
mirror = true
|
website = null
|
||||||
migration_clone_address = "https://github.com/foo-dogsquared/website.git"
|
interval = null
|
||||||
migration_service = "github"
|
}
|
||||||
migration_service_auth_token = var.github_clone_token
|
wiki = {
|
||||||
migration_mirror_interval = "4h"
|
website = "https://wiki.foodogsquared.one"
|
||||||
|
interval = "1h"
|
||||||
|
}
|
||||||
|
asciidoctor-foodogsquared-extensions = {
|
||||||
|
website = null
|
||||||
|
interval = null
|
||||||
|
}
|
||||||
|
website = {
|
||||||
website = "https://foodogsquared.one"
|
website = "https://foodogsquared.one"
|
||||||
private = false
|
interval = "1h"
|
||||||
}
|
}
|
||||||
|
nixos-config = {
|
||||||
resource "gitea_repository" "asciidoctor-foodogsquared-extensions" {
|
website = "https://foo-dogsquared.github.io/nixos-config"
|
||||||
|
interval = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
name = each.key
|
||||||
username = gitea_user.foodogsquared.username
|
username = gitea_user.foodogsquared.username
|
||||||
name = "asciidoctor-foodogsquared-extensions"
|
|
||||||
mirror = true
|
mirror = true
|
||||||
migration_clone_address = "https://github.com/foo-dogsquared/asciidoctor-foodogsquared-extensions.git"
|
migration_clone_address = "https://github.com/foo-dogsquared/${each.key}.git"
|
||||||
migration_service = "github"
|
migration_service = "github"
|
||||||
migration_service_auth_token = var.github_clone_token
|
migration_service_auth_token = var.github_clone_token
|
||||||
migration_mirror_interval = "4h"
|
migration_mirror_interval = each.value.interval != null ? each.value.interval : "4h"
|
||||||
private = false
|
website = each.value.website
|
||||||
}
|
|
||||||
|
|
||||||
resource "gitea_repository" "wiki" {
|
|
||||||
username = gitea_user.foodogsquared.username
|
|
||||||
name = "wiki"
|
|
||||||
mirror = true
|
|
||||||
migration_clone_address = "https://github.com/foo-dogsquared/wiki.git"
|
|
||||||
migration_service = "github"
|
|
||||||
migration_service_auth_token = var.github_clone_token
|
|
||||||
migration_mirror_interval = "4h"
|
|
||||||
website = "https://wiki.foodogsquared.one"
|
|
||||||
private = false
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "gitea_repository" "dotfiles" {
|
|
||||||
username = gitea_user.foodogsquared.username
|
|
||||||
name = "dotfiles"
|
|
||||||
mirror = true
|
|
||||||
migration_clone_address = "https://github.com/foo-dogsquared/dotfiles.git"
|
|
||||||
migration_service = "github"
|
|
||||||
migration_service_auth_token = var.github_clone_token
|
|
||||||
migration_mirror_interval = "4h"
|
|
||||||
website = "https://wiki.foodogsquared.one"
|
|
||||||
private = false
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "gitea_repository" "ansible-playbooks" {
|
|
||||||
username = gitea_user.foodogsquared.username
|
|
||||||
name = "ansible-playbooks"
|
|
||||||
mirror = true
|
|
||||||
migration_clone_address = "https://github.com/foo-dogsquared/ansible-playbooks.git"
|
|
||||||
migration_service = "github"
|
|
||||||
migration_service_auth_token = var.github_clone_token
|
|
||||||
migration_mirror_interval = "4h"
|
|
||||||
private = false
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "gitea_repository" "hugo-theme-more-contentful" {
|
|
||||||
username = gitea_user.foodogsquared.username
|
|
||||||
name = "hugo-theme-more-contentful"
|
|
||||||
mirror = true
|
|
||||||
migration_clone_address = "https://github.com/foo-dogsquared/hugo-theme-more-contentful.git"
|
|
||||||
migration_service = "github"
|
|
||||||
migration_service_auth_token = var.github_clone_token
|
|
||||||
migration_mirror_interval = "4h"
|
|
||||||
private = false
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "gitea_repository" "hugo-theme-contentful" {
|
|
||||||
username = gitea_user.foodogsquared.username
|
|
||||||
name = "hugo-theme-contentful"
|
|
||||||
mirror = true
|
|
||||||
migration_clone_address = "https://github.com/foo-dogsquared/hugo-theme-contentful.git"
|
|
||||||
migration_service = "github"
|
|
||||||
migration_service_auth_token = var.github_clone_token
|
|
||||||
migration_mirror_interval = "4h"
|
|
||||||
private = false
|
private = false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user