2024-10-04 06:27:44 +00:00
|
|
|
variable "github_clone_token" {
|
|
|
|
sensitive = true
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "gitea_foodogsquared_password" {
|
|
|
|
sensitive = true
|
|
|
|
}
|
|
|
|
|
|
|
|
provider "gitea" {
|
|
|
|
# We're using envvars GITEA_BASE_URL instead of `base_url` and also
|
|
|
|
# GITEA_TOKEN instead of `token`.
|
|
|
|
insecure = false
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "gitea_user" "foodogsquared" {
|
|
|
|
username = "foodogsquared"
|
|
|
|
login_name = "foodogsquared"
|
|
|
|
password = var.gitea_foodogsquared_password
|
|
|
|
email = "foodogsquared@foodogsquared.one"
|
|
|
|
admin = true
|
|
|
|
active = true
|
|
|
|
full_name = "Gabriel Arazas"
|
|
|
|
location = "Inside of your house"
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "gitea_public_key" "foodogsquared" {
|
|
|
|
title = "main public key"
|
2024-10-11 05:15:01 +00:00
|
|
|
username = gitea_user.foodogsquared.username
|
|
|
|
key = file("../../../../home-manager/foo-dogsquared/files/ssh-key.pub")
|
2024-10-04 06:27:44 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 01:35:36 +00:00
|
|
|
resource "gitea_repository" "personal_projects_from_github" {
|
|
|
|
for_each = tomap({
|
|
|
|
hugo-theme-more-contentful = {
|
|
|
|
website = "https://foo-dogsquared.github.io/hugo-theme-more-contentful"
|
|
|
|
interval = null
|
|
|
|
}
|
|
|
|
hugo-theme-contentful = {
|
|
|
|
website = "https://foo-dogsquared.github.io/hugo-theme-contentful"
|
|
|
|
interval = null
|
|
|
|
}
|
|
|
|
ansible-playbooks = {
|
|
|
|
website = null
|
|
|
|
interval = null
|
|
|
|
}
|
|
|
|
dotfiles = {
|
|
|
|
website = null
|
|
|
|
interval = null
|
|
|
|
}
|
|
|
|
wiki = {
|
|
|
|
website = "https://wiki.foodogsquared.one"
|
|
|
|
interval = "1h"
|
|
|
|
}
|
|
|
|
asciidoctor-foodogsquared-extensions = {
|
|
|
|
website = null
|
|
|
|
interval = null
|
|
|
|
}
|
|
|
|
website = {
|
|
|
|
website = "https://foodogsquared.one"
|
|
|
|
interval = "1h"
|
|
|
|
}
|
|
|
|
nixos-config = {
|
|
|
|
website = "https://foo-dogsquared.github.io/nixos-config"
|
|
|
|
interval = null
|
|
|
|
}
|
|
|
|
})
|
|
|
|
name = each.key
|
2024-10-11 05:15:01 +00:00
|
|
|
username = gitea_user.foodogsquared.username
|
2024-10-04 06:27:44 +00:00
|
|
|
mirror = true
|
2024-11-19 01:35:36 +00:00
|
|
|
migration_clone_address = "https://github.com/foo-dogsquared/${each.key}.git"
|
2024-10-04 06:27:44 +00:00
|
|
|
migration_service = "github"
|
|
|
|
migration_service_auth_token = var.github_clone_token
|
2024-11-19 01:35:36 +00:00
|
|
|
migration_mirror_interval = each.value.interval != null ? each.value.interval : "4h"
|
|
|
|
website = each.value.website
|
2024-11-06 12:07:17 +00:00
|
|
|
private = false
|
|
|
|
}
|