diff --git a/flake.lock b/flake.lock index 06e2fbf..10aacd4 100644 --- a/flake.lock +++ b/flake.lock @@ -16,9 +16,26 @@ "type": "github" } }, + "opentofu-registry": { + "flake": false, + "locked": { + "lastModified": 1708777211, + "narHash": "sha256-o7B4N9ccXeMcZl42NP+ddC05+h86sdH4v0yOW2xaD54=", + "owner": "opentofu", + "repo": "registry", + "rev": "5e26ecf04a5c44ddc618883b60eb1ffdaa4389a4", + "type": "github" + }, + "original": { + "owner": "opentofu", + "repo": "registry", + "type": "github" + } + }, "root": { "inputs": { "nixpkgs": "nixpkgs", + "opentofu-registry": "opentofu-registry", "systems": "systems", "treefmt-nix": "treefmt-nix" } diff --git a/flake.nix b/flake.nix index c985ca3..8d895b6 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,14 @@ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.systems.url = "github:nix-systems/default"; - inputs.treefmt-nix.url = "github:numtide/treefmt-nix"; - inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + inputs.treefmt-nix = { + url = "github:numtide/treefmt-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + inputs.opentofu-registry = { + url = "github:opentofu/registry"; + flake = false; + }; outputs = { @@ -12,7 +18,8 @@ nixpkgs, systems, treefmt-nix, - }: + ... + }@inputs: let eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); in @@ -22,7 +29,11 @@ default = pkgs.mkShell { packages = [ pkgs.findutils + pkgs.gh pkgs.gnumake + pkgs.jq + pkgs.hcl2json + (pkgs.callPackage ./tofu { inherit (inputs) opentofu-registry; }) ]; }; } diff --git a/tofu/.gitignore b/tofu/.gitignore new file mode 100644 index 0000000..5dfe310 --- /dev/null +++ b/tofu/.gitignore @@ -0,0 +1,2 @@ +.terraform* +terraform.tfstate* diff --git a/tofu/default.nix b/tofu/default.nix new file mode 100644 index 0000000..12556cc --- /dev/null +++ b/tofu/default.nix @@ -0,0 +1,66 @@ +# Copyright manveru. https://gist.github.com/manveru/bcd2b4e0d3a30abbdec19573083b34b7 +{ + fetchurl, + go, + lib, + opentofu, + opentofu-registry, + stdenv, + unzip, +}: +let + mkTerraformProvider = + { + owner, + repo, + version, + src, + registry ? "registry.opentofu.org", + }: + let + inherit (go) GOARCH GOOS; + provider-source-address = "${registry}/${owner}/${repo}"; + in + stdenv.mkDerivation { + pname = "terraform-provider-${repo}"; + inherit version src; + + unpackPhase = "unzip -o $src"; + + nativeBuildInputs = [ unzip ]; + + buildPhase = ":"; + + # The upstream terraform wrapper assumes the provider filename here. + installPhase = '' + dir=$out/libexec/terraform-providers/${provider-source-address}/${version}/${GOOS}_${GOARCH} + mkdir -p "$dir" + mv terraform-* "$dir/" + ''; + + passthru = { + inherit provider-source-address; + }; + }; + + readJSON = f: builtins.fromJSON (lib.readFile f); + + # fetch the latest version + providerFor = + owner: repo: + let + json = readJSON (opentofu-registry + "/providers/${lib.substring 0 1 owner}/${owner}/${repo}.json"); + latest = lib.head json.versions; + matching = lib.filter (e: e.os == "linux" && e.arch == "amd64") latest.targets; + target = lib.head matching; + in + mkTerraformProvider { + inherit (latest) version; + inherit owner repo; + src = fetchurl { + url = target.download_url; + sha256 = target.shasum; + }; + }; +in +opentofu.withPlugins (_: [ (providerFor "integrations" "github") ]) diff --git a/tofu/generated.tf b/tofu/generated.tf new file mode 100644 index 0000000..a17aa0e --- /dev/null +++ b/tofu/generated.tf @@ -0,0 +1,2356 @@ +# __generated__ by OpenTofu +# Please review these resources and move them into your main configuration files. + +# __generated__ by OpenTofu from "nixos-summer" +resource "github_repository" "nixos-summer" { + allow_auto_merge = false + allow_merge_commit = false + allow_rebase_merge = false + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = null + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "nixos-summer" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixos" +resource "github_repository_collaborators" "nixos" { + repository = "nixos" +} + +# __generated__ by OpenTofu from "bundlers" +resource "github_repository_collaborators" "bundlers" { + repository = "bundlers" + user { + permission = "admin" + username = "tomberek" + } +} + +# __generated__ by OpenTofu from "nixops-aws" +resource "github_repository" "nixops-aws" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = null + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "nixops-aws" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixos-planet" +resource "github_repository" "nixos-planet" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = null + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "nixos-planet" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "hydra-provisioner" +resource "github_repository" "hydra-provisioner" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "On-demand provisioning tool for Hydra" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "hydra-provisioner" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from ".github" +resource "github_repository_collaborators" "_github" { + repository = ".github" + team { + permission = "admin" + team_id = "infra" + } +} + +# __generated__ by OpenTofu from "language-nix" +resource "github_repository_collaborators" "language-nix" { + repository = "language-nix" + team { + permission = "maintain" + team_id = "haskell" + } + team { + permission = "pull" + team_id = "cabal2nix-owners" + } + user { + permission = "maintain" + username = "peti" + } +} + +# __generated__ by OpenTofu from "rfc-steering-committee" +resource "github_repository_collaborators" "rfc-steering-committee" { + repository = "rfc-steering-committee" + team { + permission = "maintain" + team_id = "rfc-steering-committee" + } + user { + permission = "admin" + username = "domenkozar" + } +} + +# __generated__ by OpenTofu from "bundlers" +resource "github_repository" "bundlers" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = null + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "bundlers" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "flake-registry" +resource "github_repository_collaborators" "flake-registry" { + repository = "flake-registry" +} + +# __generated__ by OpenTofu from "ofborg-viewer" +resource "github_repository_collaborators" "ofborg-viewer" { + repository = "ofborg-viewer" + team { + permission = "maintain" + team_id = "admins" + } + user { + permission = "maintain" + username = "samueldr" + } + user { + permission = "push" + username = "cole-h" + } +} + +# __generated__ by OpenTofu from "package-list" +resource "github_repository" "package-list" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "Deprecated, use upload-nixos-package-list-to-hackage.sh instead. Generate the list of available Haskell packages for Hackage." + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "package-list" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nix-eclipse" +resource "github_repository_collaborators" "nix-eclipse" { + repository = "nix-eclipse" +} + +# __generated__ by OpenTofu from "mvn2nix-maven-plugin" +resource "github_repository" "mvn2nix-maven-plugin" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "Generate project-info.json for use with nix's Maven repository generation functions" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "mvn2nix-maven-plugin" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "release-wiki" +resource "github_repository_collaborators" "release-wiki" { + repository = "release-wiki" + team { + permission = "maintain" + team_id = "nixos-release-managers" + } +} + +# __generated__ by OpenTofu from "nixpart" +resource "github_repository" "nixpart" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "NixOS storage manager/partitioner" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "nixpart" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from ".github" +resource "github_repository" "_github" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "org-level github configuration" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = ".github" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixos-status" +resource "github_repository" "nixos-status" { + allow_auto_merge = false + allow_merge_commit = false + allow_rebase_merge = false + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "The website showing an overview status of NixOS infra and CI." + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = "https://status.nixos.org" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "nixos-status" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "moderation" +resource "github_repository_collaborators" "moderation" { + repository = "moderation" + team { + permission = "admin" + team_id = "moderation" + } +} + +# __generated__ by OpenTofu from "nix-mode" +resource "github_repository" "nix-mode" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "An Emacs major mode for editing Nix expressions." + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "nix-mode" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = ["emacs", "major-mode", "nix", "nixpkgs", "syntax-highlighting"] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixops-aws" +resource "github_repository_collaborators" "nixops-aws" { + repository = "nixops-aws" + team { + permission = "push" + team_id = "nixops-committers" + } + user { + permission = "admin" + username = "grahamc" + } +} + +# __generated__ by OpenTofu from "npm2nix" +resource "github_repository" "npm2nix" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "Generate nix expressions to build npm packages" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "npm2nix" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixos-weekly" +resource "github_repository" "nixos-weekly" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "NixOS Weekly Newsletter" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = false + homepage_url = "https://weekly.nixos.org/" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "nixos-weekly" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = ["blog", "news", "nix", "nixops", "nixos"] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + pages { + build_type = "legacy" + cname = "weekly.nixos.org" + source { + branch = "gh-pages" + path = "/" + } + } + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixops-dashboard" +resource "github_repository_collaborators" "nixops-dashboard" { + repository = "nixops-dashboard" +} + +# __generated__ by OpenTofu from "whats-new-in-nix" +resource "github_repository_collaborators" "whats-new-in-nix" { + repository = "whats-new-in-nix" + user { + permission = "push" + username = "bryanhonof" + } + user { + permission = "push" + username = "djacu" + } + user { + permission = "push" + username = "tomberek" + } +} + +# __generated__ by OpenTofu from "patchelf" +resource "github_repository_collaborators" "patchelf" { + repository = "patchelf" + team { + permission = "maintain" + team_id = "patchelf-maintainers" + } + user { + permission = "admin" + username = "Mic92" + } + user { + permission = "maintain" + username = "brenoguim" + } +} + +# __generated__ by OpenTofu from "hydra-ant-logger" +resource "github_repository_collaborators" "hydra-ant-logger" { + repository = "hydra-ant-logger" + team { + permission = "push" + team_id = "hydra-maintainers" + } +} + +# __generated__ by OpenTofu from "mobile-nixos-website" +resource "github_repository" "mobile-nixos-website" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = null + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = "https://mobile.nixos.org" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "mobile-nixos-website" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + pages { + build_type = "legacy" + cname = "mobile.nixos.org" + source { + branch = "gh-pages" + path = "/" + } + } + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixos-planet" +resource "github_repository_collaborators" "nixos-planet" { + repository = "nixos-planet" +} + +# __generated__ by OpenTofu from "nixpart" +resource "github_repository_collaborators" "nixpart" { + repository = "nixpart" + team { + permission = "admin" + team_id = "nixpart-committers" + } +} + +# __generated__ by OpenTofu from "docker" +resource "github_repository" "docker" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "DEPRECATED! Dockerfiles to package Nix in a minimal docker container" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = false + has_wiki = false + homepage_url = "https://hub.docker.com/r/nixos/nix/" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "docker" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = ["docker", "docker-image", "dockerfile", "nix", "nixos"] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "hackage-db" +resource "github_repository_collaborators" "hackage-db" { + repository = "hackage-db" + team { + permission = "maintain" + team_id = "haskell" + } + team { + permission = "pull" + team_id = "cabal2nix-owners" + } + user { + permission = "maintain" + username = "peti" + } +} + +# __generated__ by OpenTofu from "rfc39" +resource "github_repository" "rfc39" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "Implementation of NixOS RFC #39." + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "rfc39" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "ofborg" +resource "github_repository" "ofborg" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = true + description = "@ofborg tooling automation https://monitoring.ofborg.org/dashboard/db/ofborg" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = "https://ofborg.org" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "ofborg" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "20th-nix" +resource "github_repository_collaborators" "_0th-nix" { + repository = "20th-nix" +} + +# __generated__ by OpenTofu from "npm2nix" +resource "github_repository_collaborators" "npm2nix" { + repository = "npm2nix" + team { + permission = "push" + team_id = "npm2nix-committers" + } +} + +# __generated__ by OpenTofu from "cabal2nix" +resource "github_repository" "cabal2nix" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = false + allow_squash_merge = false + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "Generate Nix build instructions from a Cabal file" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = "https://haskell4nix.readthedocs.io" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "cabal2nix" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = ["cabal", "cabal2nix", "hackage", "haskell", "nix", "nixpkgs"] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "jailbreak-cabal" +resource "github_repository" "jailbreak-cabal" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "Strip version restrictions from build dependencies in Cabal files." + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = false + homepage_url = "http://hackage.haskell.org/package/jailbreak-cabal" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "jailbreak-cabal" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "ofborg" +resource "github_repository_collaborators" "ofborg" { + repository = "ofborg" + team { + permission = "push" + team_id = "ofborg-maintainers" + } + user { + permission = "admin" + username = "cole-h" + } + user { + permission = "triage" + username = "Artturin" + } +} + +# __generated__ by OpenTofu from "hydra-ant-logger" +resource "github_repository" "hydra-ant-logger" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = null + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "hydra-ant-logger" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "language-nix" +resource "github_repository" "language-nix" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "Data types and useful functions to represent and manipulate the Nix language. | Source has moved to https://github.com/nixos/cabal2nix" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = false + has_wiki = false + homepage_url = "http://hackage.haskell.org/package/language-nix" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "language-nix" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "whats-new-in-nix" +resource "github_repository" "whats-new-in-nix" { + allow_auto_merge = false + allow_merge_commit = false + allow_rebase_merge = false + allow_squash_merge = true + allow_update_branch = true + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = true + description = null + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "whats-new-in-nix" + squash_merge_commit_message = "PR_BODY" + squash_merge_commit_title = "PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nix-idea" +resource "github_repository_collaborators" "nix-idea" { + repository = "nix-idea" + team { + permission = "maintain" + team_id = "nix-idea" + } + team { + permission = "push" + team_id = "nixpkgs-committers" + } + user { + permission = "admin" + username = "Mic92" + } + user { + permission = "admin" + username = "pSub" + } +} + +# __generated__ by OpenTofu from "security" +resource "github_repository_collaborators" "security" { + repository = "security" + team { + permission = "admin" + team_id = "security" + } + user { + permission = "admin" + username = "domenkozar" + } + user { + permission = "push" + username = "fpletz" + } + user { + permission = "push" + username = "globin" + } +} + +# __generated__ by OpenTofu from "nixos-common-styles" +resource "github_repository_collaborators" "nixos-common-styles" { + repository = "nixos-common-styles" + team { + permission = "push" + team_id = "nixos-homepage" + } + user { + permission = "maintain" + username = "lucperkins" + } +} + +# __generated__ by OpenTofu from "20th-nix" +resource "github_repository" "_0th-nix" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "20 years of Nix" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = "https://20th.nixos.org/" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "20th-nix" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "security" +resource "github_repository" "security" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = null + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "security" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixos-status" +resource "github_repository_collaborators" "nixos-status" { + repository = "nixos-status" + team { + permission = "admin" + team_id = "infra" + } +} + +# __generated__ by OpenTofu from "jailbreak-cabal" +resource "github_repository_collaborators" "jailbreak-cabal" { + repository = "jailbreak-cabal" + team { + permission = "maintain" + team_id = "haskell" + } + team { + permission = "pull" + team_id = "cabal2nix-owners" + } + user { + permission = "maintain" + username = "peti" + } +} + +# __generated__ by OpenTofu from "hydra-provisioner" +resource "github_repository_collaborators" "hydra-provisioner" { + repository = "hydra-provisioner" +} + +# __generated__ by OpenTofu from "nix-book" +resource "github_repository" "nix-book" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "Nix documentation – centralized community online learning resource for Nix" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = false + homepage_url = "https://discourse.nixos.org/t/documentation-team-flattening-the-learning-curve/20003" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "nix-book" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = ["documentation", "learning", "nix"] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "ofborg-viewer" +resource "github_repository" "ofborg-viewer" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = null + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "ofborg-viewer" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixops-dashboard" +resource "github_repository" "nixops-dashboard" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "NixOps Dashboard" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "nixops-dashboard" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nix-eclipse" +resource "github_repository" "nix-eclipse" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "Nix Eclipse plugin" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "nix-eclipse" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "mvn2nix-maven-plugin" +resource "github_repository_collaborators" "mvn2nix-maven-plugin" { + repository = "mvn2nix-maven-plugin" + user { + permission = "maintain" + username = "fzakaria" + } +} + +# __generated__ by OpenTofu from "package-list" +resource "github_repository_collaborators" "package-list" { + repository = "package-list" + team { + permission = "maintain" + team_id = "haskell" + } + team { + permission = "pull" + team_id = "cabal2nix-owners" + } + user { + permission = "maintain" + username = "peti" + } +} + +# __generated__ by OpenTofu from "darwin-stubs" +resource "github_repository" "darwin-stubs" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "Text API (TAPI) files to support a pure build environment on macOS in nixpkgs." + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "darwin-stubs" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "snapd-nix-base" +resource "github_repository" "snapd-nix-base" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "The Nix base snap for distributing Nix-built software via the Snap store." + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "snapd-nix-base" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "distribution-nixpkgs" +resource "github_repository" "distribution-nixpkgs" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "Haskell types and functions to represent, query, and manipulate the Nixpkgs distribution. | Source has moved to https://github.com/nixos/cabal2nix" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = false + homepage_url = "http://hackage.haskell.org/package/distribution-nixpkgs" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "distribution-nixpkgs" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "rfc-steering-committee" +resource "github_repository" "rfc-steering-committee" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "Workflows and notes from Nix steering committee" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "rfc-steering-committee" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = ["nix", "rfc"] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "cabal2nix" +resource "github_repository_collaborators" "cabal2nix" { + repository = "cabal2nix" + team { + permission = "admin" + team_id = "cabal2nix-owners" + } + team { + permission = "maintain" + team_id = "haskell" + } + user { + permission = "push" + username = "basvandijk" + } + user { + permission = "push" + username = "ryantm" + } +} + +# __generated__ by OpenTofu from "flake-registry" +resource "github_repository" "flake-registry" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "Global registry of Nix flakes" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "flake-registry" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixpkgs-channels" +resource "github_repository_collaborators" "nixpkgs-channels" { + repository = "nixpkgs-channels" + team { + permission = "push" + team_id = "channel-updaters" + } +} + +# __generated__ by OpenTofu from "rfc39" +resource "github_repository_collaborators" "rfc39" { + repository = "rfc39" + team { + permission = "admin" + team_id = "infra" + } + user { + permission = "admin" + username = "grahamc" + } +} + +# __generated__ by OpenTofu from "systemd" +resource "github_repository_collaborators" "systemd" { + repository = "systemd" +} + +# __generated__ by OpenTofu from "docker" +resource "github_repository_collaborators" "docker" { + repository = "docker" + team { + permission = "push" + team_id = "nix-team" + } + user { + permission = "admin" + username = "peti" + } +} + +# __generated__ by OpenTofu from "nixops-hetzner" +resource "github_repository" "nixops-hetzner" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = null + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "nixops-hetzner" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixops-hetzner" +resource "github_repository_collaborators" "nixops-hetzner" { + repository = "nixops-hetzner" + team { + permission = "push" + team_id = "nixops-committers" + } + user { + permission = "admin" + username = "grahamc" + } +} + +# __generated__ by OpenTofu from "release-wiki" +resource "github_repository" "release-wiki" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = null + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = "https://nixos.github.io/release-wiki" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "release-wiki" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = false + pages { + build_type = "legacy" + cname = null + source { + branch = "gh-pages" + path = "/" + } + } + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixos-summer" +resource "github_repository_collaborators" "nixos-summer" { + repository = "nixos-summer" + team { + permission = "triage" + team_id = "documentation-team" + } + user { + permission = "admin" + username = "MMesch" + } + user { + permission = "admin" + username = "mightyiam" + } + user { + permission = "maintain" + username = "fricklerhandwerk" + } + user { + permission = "push" + username = "DieracDelta" + } + user { + permission = "push" + username = "gytis-ivaskevicius" + } + user { + permission = "push" + username = "nrdsp" + } + user { + permission = "push" + username = "sbruder" + } +} + +# __generated__ by OpenTofu from "nixpkgs-channels" +resource "github_repository" "nixpkgs-channels" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "DEPRECATED! Use NixOS/nixpkgs repository instead." + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = false + has_projects = false + has_wiki = false + homepage_url = "https://github.com/NixOS/nixpkgs" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "nixpkgs-channels" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nixos-common-styles" +resource "github_repository" "nixos-common-styles" { + allow_auto_merge = true + allow_merge_commit = false + allow_rebase_merge = false + allow_squash_merge = true + allow_update_branch = true + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = true + description = "Common styles for NixOS related web sites." + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = false + has_wiki = false + homepage_url = "https://common-styles.nixos.org/" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "nixos-common-styles" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nix-mode" +resource "github_repository_collaborators" "nix-mode" { + repository = "nix-mode" + team { + permission = "pull" + team_id = "nix-team" + } + user { + permission = "admin" + username = "domenkozar" + } + user { + permission = "push" + username = "etu" + } + user { + permission = "push" + username = "matthewbauer" + } +} + +# __generated__ by OpenTofu from "patchelf" +resource "github_repository" "patchelf" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "A small utility to modify the dynamic linker and RPATH of ELF executables" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "patchelf" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nix-book" +resource "github_repository_collaborators" "nix-book" { + repository = "nix-book" + team { + permission = "maintain" + team_id = "documentation-team" + } + team { + permission = "maintain" + team_id = "nix-book" + } +} + +# __generated__ by OpenTofu from "systemd" +resource "github_repository" "systemd" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "systemd upstream" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = false + has_projects = true + has_wiki = false + homepage_url = "http://www.freedesktop.org/wiki/Software/systemd/" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "systemd" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "nix-idea" +resource "github_repository" "nix-idea" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "Nix plugin for the IntelliJ IDEA IDE" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = true + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "nix-idea" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = true + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "mobile-nixos-website" +resource "github_repository_collaborators" "mobile-nixos-website" { + repository = "mobile-nixos-website" + team { + permission = "push" + team_id = "mobile-nixos" + } +} + +# __generated__ by OpenTofu from "distribution-nixpkgs" +resource "github_repository_collaborators" "distribution-nixpkgs" { + repository = "distribution-nixpkgs" + team { + permission = "maintain" + team_id = "haskell" + } + team { + permission = "pull" + team_id = "cabal2nix-owners" + } + user { + permission = "maintain" + username = "peti" + } +} + +# __generated__ by OpenTofu from "nixos" +resource "github_repository" "nixos" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "OBSOLETE (go to NixOS/nixpkgs) - NixOS, a Linux distribution based on the Nix package manager - OBSOLETE (go to NixOS/nixpkgs)" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = false + homepage_url = null + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "nixos" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "moderation" +resource "github_repository" "moderation" { + allow_auto_merge = false + allow_merge_commit = true + allow_rebase_merge = true + allow_squash_merge = true + allow_update_branch = false + archive_on_destroy = null + archived = false + auto_init = false + delete_branch_on_merge = false + description = "The home of the moderation team" + gitignore_template = null + has_discussions = false + has_downloads = true + has_issues = true + has_projects = true + has_wiki = false + homepage_url = "https://nixos.org/community/teams/moderation.html" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = "PR_TITLE" + merge_commit_title = "MERGE_MESSAGE" + name = "moderation" + squash_merge_commit_message = "COMMIT_MESSAGES" + squash_merge_commit_title = "COMMIT_OR_PR_TITLE" + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = false + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "hackage-db" +resource "github_repository" "hackage-db" { + allow_auto_merge = null + allow_merge_commit = null + allow_rebase_merge = null + allow_squash_merge = null + allow_update_branch = null + archive_on_destroy = null + archived = true + auto_init = false + delete_branch_on_merge = null + description = "provide access to the Hackage database via Data.Map | Source has moved to https://github.com/nixos/cabal2nix" + gitignore_template = null + has_discussions = false + has_downloads = null + has_issues = true + has_projects = true + has_wiki = false + homepage_url = "http://hackage.haskell.org/package/hackage-db" + ignore_vulnerability_alerts_during_read = null + is_template = false + license_template = null + merge_commit_message = null + merge_commit_title = null + name = "hackage-db" + squash_merge_commit_message = null + squash_merge_commit_title = null + topics = [] + visibility = "public" + vulnerability_alerts = false + web_commit_signoff_required = null + security_and_analysis { + secret_scanning { + status = "disabled" + } + secret_scanning_push_protection { + status = "disabled" + } + } +} + +# __generated__ by OpenTofu from "darwin-stubs" +resource "github_repository_collaborators" "darwin-stubs" { + repository = "darwin-stubs" + team { + permission = "push" + team_id = "darwin-maintainers" + } + user { + permission = "admin" + username = "thefloweringash" + } +} + +# __generated__ by OpenTofu from "snapd-nix-base" +resource "github_repository_collaborators" "snapd-nix-base" { + repository = "snapd-nix-base" + user { + permission = "admin" + username = "grahamc" + } +} + +# __generated__ by OpenTofu from "nixos-weekly" +resource "github_repository_collaborators" "nixos-weekly" { + repository = "nixos-weekly" + team { + permission = "push" + team_id = "nixpkgs-committers" + } + user { + permission = "admin" + username = "domenkozar" + } + user { + permission = "admin" + username = "edolstra" + } + user { + permission = "admin" + username = "garbas" + } + user { + permission = "push" + username = "4z3" + } + user { + permission = "push" + username = "Lassulus" + } + user { + permission = "push" + username = "badmutex" + } + user { + permission = "push" + username = "johbo" + } + user { + permission = "push" + username = "teh" + } +} diff --git a/tofu/import_org.tf b/tofu/import_org.tf new file mode 100644 index 0000000..d4d421d --- /dev/null +++ b/tofu/import_org.tf @@ -0,0 +1,4 @@ +import { + id = "487568" + to = github_organization_settings.NixOS +} diff --git a/tofu/import_repos.tf b/tofu/import_repos.tf new file mode 100644 index 0000000..8944296 --- /dev/null +++ b/tofu/import_repos.tf @@ -0,0 +1,730 @@ +import { + id = ".github" + to = github_repository._github +} + +import { + id = ".github" + to = github_repository_collaborators._github +} + +import { + id = "20th-nix" + to = github_repository._0th-nix +} + +import { + id = "20th-nix" + to = github_repository_collaborators._0th-nix +} + +import { + id = "aarch64-build-box" + to = github_repository.aarch64-build-box +} + +import { + id = "aarch64-build-box" + to = github_repository_collaborators.aarch64-build-box +} + +import { + id = "amis" + to = github_repository.amis +} + +import { + id = "amis" + to = github_repository_collaborators.amis +} + +import { + id = "bundlers" + to = github_repository.bundlers +} + +import { + id = "bundlers" + to = github_repository_collaborators.bundlers +} + +import { + id = "cabal2nix" + to = github_repository.cabal2nix +} + +import { + id = "cabal2nix" + to = github_repository_collaborators.cabal2nix +} + +import { + id = "calamares-nixos-extensions" + to = github_repository.calamares-nixos-extensions +} + +import { + id = "calamares-nixos-extensions" + to = github_repository_collaborators.calamares-nixos-extensions +} + +import { + id = "darwin-stubs" + to = github_repository.darwin-stubs +} + +import { + id = "darwin-stubs" + to = github_repository_collaborators.darwin-stubs +} + +import { + id = "distribution-nixpkgs" + to = github_repository.distribution-nixpkgs +} + +import { + id = "distribution-nixpkgs" + to = github_repository_collaborators.distribution-nixpkgs +} + +import { + id = "docker" + to = github_repository.docker +} + +import { + id = "docker" + to = github_repository_collaborators.docker +} + +import { + id = "equinix-metal-builders" + to = github_repository.equinix-metal-builders +} + +import { + id = "equinix-metal-builders" + to = github_repository_collaborators.equinix-metal-builders +} + +import { + id = "experimental-nix-installer" + to = github_repository.experimental-nix-installer +} + +import { + id = "experimental-nix-installer" + to = github_repository_collaborators.experimental-nix-installer +} + +import { + id = "first-time-contribution-tagger" + to = github_repository.first-time-contribution-tagger +} + +import { + id = "first-time-contribution-tagger" + to = github_repository_collaborators.first-time-contribution-tagger +} + +import { + id = "flake-registry" + to = github_repository.flake-registry +} + +import { + id = "flake-registry" + to = github_repository_collaborators.flake-registry +} + +import { + id = "foundation" + to = github_repository.foundation +} + +import { + id = "foundation" + to = github_repository_collaborators.foundation +} + +import { + id = "GSoC" + to = github_repository.gsoc +} + +import { + id = "GSoC" + to = github_repository_collaborators.gsoc +} + +import { + id = "hackage-db" + to = github_repository.hackage-db +} + +import { + id = "hackage-db" + to = github_repository_collaborators.hackage-db +} + +import { + id = "hydra" + to = github_repository.hydra +} + +import { + id = "hydra" + to = github_repository_collaborators.hydra +} + +import { + id = "hydra-ant-logger" + to = github_repository.hydra-ant-logger +} + +import { + id = "hydra-ant-logger" + to = github_repository_collaborators.hydra-ant-logger +} + +import { + id = "hydra-provisioner" + to = github_repository.hydra-provisioner +} + +import { + id = "hydra-provisioner" + to = github_repository_collaborators.hydra-provisioner +} + +import { + id = "infra" + to = github_repository.infra +} + +import { + id = "infra" + to = github_repository_collaborators.infra +} + +import { + id = "jailbreak-cabal" + to = github_repository.jailbreak-cabal +} + +import { + id = "jailbreak-cabal" + to = github_repository_collaborators.jailbreak-cabal +} + +import { + id = "language-nix" + to = github_repository.language-nix +} + +import { + id = "language-nix" + to = github_repository_collaborators.language-nix +} + +import { + id = "marketing" + to = github_repository.marketing +} + +import { + id = "marketing" + to = github_repository_collaborators.marketing +} + +import { + id = "mobile-nixos" + to = github_repository.mobile-nixos +} + +import { + id = "mobile-nixos" + to = github_repository_collaborators.mobile-nixos +} + +import { + id = "mobile-nixos-website" + to = github_repository.mobile-nixos-website +} + +import { + id = "mobile-nixos-website" + to = github_repository_collaborators.mobile-nixos-website +} + +import { + id = "moderation" + to = github_repository.moderation +} + +import { + id = "moderation" + to = github_repository_collaborators.moderation +} + +import { + id = "mvn2nix-maven-plugin" + to = github_repository.mvn2nix-maven-plugin +} + +import { + id = "mvn2nix-maven-plugin" + to = github_repository_collaborators.mvn2nix-maven-plugin +} + +import { + id = "nix" + to = github_repository.nix +} + +import { + id = "nix" + to = github_repository_collaborators.nix +} + +import { + id = "nix-book" + to = github_repository.nix-book +} + +import { + id = "nix-book" + to = github_repository_collaborators.nix-book +} + +import { + id = "nix-eclipse" + to = github_repository.nix-eclipse +} + +import { + id = "nix-eclipse" + to = github_repository_collaborators.nix-eclipse +} + +import { + id = "nix-idea" + to = github_repository.nix-idea +} + +import { + id = "nix-idea" + to = github_repository_collaborators.nix-idea +} + +import { + id = "nix-mode" + to = github_repository.nix-mode +} + +import { + id = "nix-mode" + to = github_repository_collaborators.nix-mode +} + +import { + id = "nix-pills" + to = github_repository.nix-pills +} + +import { + id = "nix-pills" + to = github_repository_collaborators.nix-pills +} + +import { + id = "nix.dev" + to = github_repository.nix_dev +} + +import { + id = "nix.dev" + to = github_repository_collaborators.nix_dev +} + +import { + id = "nixops" + to = github_repository.nixops +} + +import { + id = "nixops" + to = github_repository_collaborators.nixops +} + +import { + id = "nixops-aws" + to = github_repository.nixops-aws +} + +import { + id = "nixops-aws" + to = github_repository_collaborators.nixops-aws +} + +import { + id = "nixops-dashboard" + to = github_repository.nixops-dashboard +} + +import { + id = "nixops-dashboard" + to = github_repository_collaborators.nixops-dashboard +} + +import { + id = "nixops-hetzner" + to = github_repository.nixops-hetzner +} + +import { + id = "nixops-hetzner" + to = github_repository_collaborators.nixops-hetzner +} + +import { + id = "nixos" + to = github_repository.nixos +} + +import { + id = "nixos" + to = github_repository_collaborators.nixos +} + +import { + id = "nixos-artwork" + to = github_repository.nixos-artwork +} + +import { + id = "nixos-artwork" + to = github_repository_collaborators.nixos-artwork +} + +import { + id = "nixos-channel-scripts" + to = github_repository.nixos-channel-scripts +} + +import { + id = "nixos-channel-scripts" + to = github_repository_collaborators.nixos-channel-scripts +} + +import { + id = "nixos-common-styles" + to = github_repository.nixos-common-styles +} + +import { + id = "nixos-common-styles" + to = github_repository_collaborators.nixos-common-styles +} + +import { + id = "nixos-hardware" + to = github_repository.nixos-hardware +} + +import { + id = "nixos-hardware" + to = github_repository_collaborators.nixos-hardware +} + +import { + id = "nixos-homepage" + to = github_repository.nixos-homepage +} + +import { + id = "nixos-homepage" + to = github_repository_collaborators.nixos-homepage +} + +import { + id = "nixos-metrics" + to = github_repository.nixos-metrics +} + +import { + id = "nixos-metrics" + to = github_repository_collaborators.nixos-metrics +} + +import { + id = "nixos-planet" + to = github_repository.nixos-planet +} + +import { + id = "nixos-planet" + to = github_repository_collaborators.nixos-planet +} + +import { + id = "nixos-search" + to = github_repository.nixos-search +} + +import { + id = "nixos-search" + to = github_repository_collaborators.nixos-search +} + +import { + id = "nixos-status" + to = github_repository.nixos-status +} + +import { + id = "nixos-status" + to = github_repository_collaborators.nixos-status +} + +import { + id = "nixos-summer" + to = github_repository.nixos-summer +} + +import { + id = "nixos-summer" + to = github_repository_collaborators.nixos-summer +} + +import { + id = "nixos-weekly" + to = github_repository.nixos-weekly +} + +import { + id = "nixos-weekly" + to = github_repository_collaborators.nixos-weekly +} + +import { + id = "nixos-wiki-infra" + to = github_repository.nixos-wiki-infra +} + +import { + id = "nixos-wiki-infra" + to = github_repository_collaborators.nixos-wiki-infra +} + +import { + id = "nixpart" + to = github_repository.nixpart +} + +import { + id = "nixpart" + to = github_repository_collaborators.nixpart +} + +import { + id = "nixpkgs" + to = github_repository.nixpkgs +} + +import { + id = "nixpkgs" + to = github_repository_collaborators.nixpkgs +} + +import { + id = "nixpkgs-channels" + to = github_repository.nixpkgs-channels +} + +import { + id = "nixpkgs-channels" + to = github_repository_collaborators.nixpkgs-channels +} + +import { + id = "nixpkgs-merge-bot" + to = github_repository.nixpkgs-merge-bot +} + +import { + id = "nixpkgs-merge-bot" + to = github_repository_collaborators.nixpkgs-merge-bot +} + +import { + id = "npm2nix" + to = github_repository.npm2nix +} + +import { + id = "npm2nix" + to = github_repository_collaborators.npm2nix +} + +import { + id = "ofborg" + to = github_repository.ofborg +} + +import { + id = "ofborg" + to = github_repository_collaborators.ofborg +} + +import { + id = "ofborg-viewer" + to = github_repository.ofborg-viewer +} + +import { + id = "ofborg-viewer" + to = github_repository_collaborators.ofborg-viewer +} + +import { + id = "package-list" + to = github_repository.package-list +} + +import { + id = "package-list" + to = github_repository_collaborators.package-list +} + +import { + id = "patchelf" + to = github_repository.patchelf +} + +import { + id = "patchelf" + to = github_repository_collaborators.patchelf +} + +import { + id = "release-wiki" + to = github_repository.release-wiki +} + +import { + id = "release-wiki" + to = github_repository_collaborators.release-wiki +} + +import { + id = "reproducible.nixos.org" + to = github_repository.reproducible_nixos_org +} + +import { + id = "reproducible.nixos.org" + to = github_repository_collaborators.reproducible_nixos_org +} + +import { + id = "rfc-steering-committee" + to = github_repository.rfc-steering-committee +} + +import { + id = "rfc-steering-committee" + to = github_repository_collaborators.rfc-steering-committee +} + +import { + id = "rfc39" + to = github_repository.rfc39 +} + +import { + id = "rfc39" + to = github_repository_collaborators.rfc39 +} + +import { + id = "rfc39-record" + to = github_repository.rfc39-record +} + +import { + id = "rfc39-record" + to = github_repository_collaborators.rfc39-record +} + +import { + id = "rfcs" + to = github_repository.rfcs +} + +import { + id = "rfcs" + to = github_repository_collaborators.rfcs +} + +import { + id = "security" + to = github_repository.security +} + +import { + id = "security" + to = github_repository_collaborators.security +} + +import { + id = "snapd-nix-base" + to = github_repository.snapd-nix-base +} + +import { + id = "snapd-nix-base" + to = github_repository_collaborators.snapd-nix-base +} + +import { + id = "systemd" + to = github_repository.systemd +} + +import { + id = "systemd" + to = github_repository_collaborators.systemd +} + +import { + id = "teams-collaboration" + to = github_repository.teams-collaboration +} + +import { + id = "teams-collaboration" + to = github_repository_collaborators.teams-collaboration +} + +import { + id = "templates" + to = github_repository.templates +} + +import { + id = "templates" + to = github_repository_collaborators.templates +} + +import { + id = "whats-new-in-nix" + to = github_repository.whats-new-in-nix +} + +import { + id = "whats-new-in-nix" + to = github_repository_collaborators.whats-new-in-nix +} + diff --git a/tofu/import_teams.tf b/tofu/import_teams.tf new file mode 100644 index 0000000..6265bde --- /dev/null +++ b/tofu/import_teams.tf @@ -0,0 +1,756 @@ +import { + id = "3806126" + to = github_team.acme +} + +import { + id = "3806126" + to = github_team_members.acme +} +import { + id = "3501925" + to = github_team.admins +} + +import { + id = "3501925" + to = github_team_members.admins +} +import { + id = "9183374" + to = github_team.amis +} + +import { + id = "9183374" + to = github_team_members.amis +} +import { + id = "1092547" + to = github_team.artwork_committers +} + +import { + id = "1092547" + to = github_team_members.artwork_committers +} +import { + id = "5468470" + to = github_team.bazel +} + +import { + id = "5468470" + to = github_team_members.bazel +} +import { + id = "4502493" + to = github_team.beam +} + +import { + id = "4502493" + to = github_team_members.beam +} +import { + id = "9141350" + to = github_team.bootstrapping +} + +import { + id = "9141350" + to = github_team_members.bootstrapping +} +import { + id = "144472" + to = github_team.cabal2nix_owners +} + +import { + id = "144472" + to = github_team_members.cabal2nix_owners +} +import { + id = "5946247" + to = github_team.calamares-nixos-extensions +} + +import { + id = "5946247" + to = github_team_members.calamares-nixos-extensions +} +import { + id = "3475569" + to = github_team.channel-updaters +} + +import { + id = "3475569" + to = github_team_members.channel-updaters +} +import { + id = "7617261" + to = github_team.coq +} + +import { + id = "7617261" + to = github_team_members.coq +} +import { + id = "3806663" + to = github_team.crystal-lang +} + +import { + id = "3806663" + to = github_team_members.crystal-lang +} +import { + id = "5704451" + to = github_team.cuda-maintainers +} + +import { + id = "5704451" + to = github_team_members.cuda-maintainers +} +import { + id = "2385202" + to = github_team.darwin-maintainers +} + +import { + id = "2385202" + to = github_team_members.darwin-maintainers +} +import { + id = "6590023" + to = github_team.documentation_team +} + +import { + id = "6590023" + to = github_team_members.documentation_team +} +import { + id = "9199489" + to = github_team.documentation-reviewers +} + +import { + id = "9199489" + to = github_team_members.documentation-reviewers +} +import { + id = "8173604" + to = github_team.dotnet +} + +import { + id = "8173604" + to = github_team_members.dotnet +} +import { + id = "2516946" + to = github_team.emacs +} + +import { + id = "2516946" + to = github_team_members.emacs +} +import { + id = "5937665" + to = github_team.enlightenment +} + +import { + id = "5937665" + to = github_team_members.enlightenment +} +import { + id = "3727378" + to = github_team.exotic-platform-maintainers +} + +import { + id = "3727378" + to = github_team_members.exotic-platform-maintainers +} +import { + id = "7718198" + to = github_team.flutter +} + +import { + id = "7718198" + to = github_team_members.flutter +} +import { + id = "1614947" + to = github_team.foundation +} + +import { + id = "1614947" + to = github_team_members.foundation +} +import { + id = "3806136" + to = github_team.freedesktop +} + +import { + id = "3806136" + to = github_team_members.freedesktop +} +import { + id = "7084621" + to = github_team.geospatial +} + +import { + id = "7084621" + to = github_team_members.geospatial +} +import { + id = "8157777" + to = github_team.gitlab +} + +import { + id = "8157777" + to = github_team_members.gitlab +} +import { + id = "3806133" + to = github_team.gnome +} + +import { + id = "3806133" + to = github_team_members.gnome +} +import { + id = "4020424" + to = github_team.golang +} + +import { + id = "4020424" + to = github_team_members.golang +} +import { + id = "9400106" + to = github_team.gsoc2024 +} + +import { + id = "9400106" + to = github_team_members.gsoc2024 +} +import { + id = "4769723" + to = github_team.haskell +} + +import { + id = "4769723" + to = github_team_members.haskell +} +import { + id = "105836" + to = github_team.hydra_maintainers +} + +import { + id = "105836" + to = github_team_members.hydra_maintainers +} +import { + id = "3824810" + to = github_team.hydra-triage +} + +import { + id = "3824810" + to = github_team_members.hydra-triage +} +import { + id = "2945160" + to = github_team.infra +} + +import { + id = "2945160" + to = github_team_members.infra +} +import { + id = "8017104" + to = github_team.infra-build +} + +import { + id = "8017104" + to = github_team_members.infra-build +} +import { + id = "7725877" + to = github_team.k3s +} + +import { + id = "7725877" + to = github_team_members.k3s +} +import { + id = "4642467" + to = github_team.kodi +} + +import { + id = "4642467" + to = github_team_members.kodi +} +import { + id = "5536808" + to = github_team.kubernetes +} + +import { + id = "5536808" + to = github_team_members.kubernetes +} +import { + id = "7678368" + to = github_team.lisp +} + +import { + id = "7678368" + to = github_team_members.lisp +} +import { + id = "5255750" + to = github_team.lua +} + +import { + id = "5255750" + to = github_team_members.lua +} +import { + id = "5937661" + to = github_team.lumina +} + +import { + id = "5937661" + to = github_team_members.lumina +} +import { + id = "9223525" + to = github_team.lxc +} + +import { + id = "9223525" + to = github_team_members.lxc +} +import { + id = "5937679" + to = github_team.lxqt +} + +import { + id = "5937679" + to = github_team_members.lxqt +} +import { + id = "7709512" + to = github_team.marketing_team +} + +import { + id = "7709512" + to = github_team_members.marketing_team +} +import { + id = "5937667" + to = github_team.mate +} + +import { + id = "5937667" + to = github_team_members.mate +} +import { + id = "3501910" + to = github_team.mobile-nixos +} + +import { + id = "3501910" + to = github_team_members.mobile-nixos +} +import { + id = "6827366" + to = github_team.moderation +} + +import { + id = "6827366" + to = github_team_members.moderation +} +import { + id = "6748534" + to = github_team.neovim +} + +import { + id = "6748534" + to = github_team_members.neovim +} +import { + id = "3199219" + to = github_team.ngi +} + +import { + id = "3199219" + to = github_team_members.ngi +} +import { + id = "3255358" + to = github_team.nix_collaborators +} + +import { + id = "3255358" + to = github_team_members.nix_collaborators +} +import { + id = "3280737" + to = github_team.nix_issue_triage +} + +import { + id = "3280737" + to = github_team_members.nix_issue_triage +} +import { + id = "174820" + to = github_team.nix_team +} + +import { + id = "174820" + to = github_team_members.nix_team +} +import { + id = "6100455" + to = github_team.nix-book +} + +import { + id = "6100455" + to = github_team_members.nix-book +} +import { + id = "4229932" + to = github_team.nix-idea +} + +import { + id = "4229932" + to = github_team_members.nix-idea +} +import { + id = "2443800" + to = github_team.nix-pill_committers +} + +import { + id = "2443800" + to = github_team_members.nix-pill_committers +} +import { + id = "143376" + to = github_team.nixops_committers +} + +import { + id = "143376" + to = github_team_members.nixops_committers +} +import { + id = "3379853" + to = github_team.nixops_hetzner +} + +import { + id = "3379853" + to = github_team_members.nixops_hetzner +} +import { + id = "1279743" + to = github_team.nixos-channel-scripts +} + +import { + id = "1279743" + to = github_team_members.nixos-channel-scripts +} +import { + id = "3526240" + to = github_team.nixos-homepage +} + +import { + id = "3526240" + to = github_team_members.nixos-homepage +} +import { + id = "3620128" + to = github_team.nixos-release-managers +} + +import { + id = "3620128" + to = github_team_members.nixos-release-managers +} +import { + id = "2227225" + to = github_team.nixpart_committers +} + +import { + id = "2227225" + to = github_team_members.nixpart_committers +} +import { + id = "203427" + to = github_team.nixpkgs_committers +} + +import { + id = "203427" + to = github_team_members.nixpkgs_committers +} +import { + id = "3345117" + to = github_team.nixpkgs_maintainers +} + +import { + id = "3345117" + to = github_team_members.nixpkgs_maintainers +} +import { + id = "8790693" + to = github_team.nixpkgs-merge-bot +} + +import { + id = "8790693" + to = github_team_members.nixpkgs-merge-bot +} +import { + id = "7309872" + to = github_team.node +} + +import { + id = "7309872" + to = github_team_members.node +} +import { + id = "863339" + to = github_team.npm2nix_committers +} + +import { + id = "863339" + to = github_team_members.npm2nix_committers +} +import { + id = "7553013" + to = github_team.ocaml +} + +import { + id = "7553013" + to = github_team_members.ocaml +} +import { + id = "2626054" + to = github_team.ofborg-maintainers +} + +import { + id = "2626054" + to = github_team_members.ofborg-maintainers +} +import { + id = "4786995" + to = github_team.pantheon +} + +import { + id = "4786995" + to = github_team_members.pantheon +} +import { + id = "5023752" + to = github_team.patchelf_maintainers +} + +import { + id = "5023752" + to = github_team_members.patchelf_maintainers +} +import { + id = "3806182" + to = github_team.php +} + +import { + id = "3806182" + to = github_team_members.php +} +import { + id = "3806184" + to = github_team.podman +} + +import { + id = "3806184" + to = github_team_members.podman +} +import { + id = "4341481" + to = github_team.qt-kde +} + +import { + id = "4341481" + to = github_team_members.qt-kde +} +import { + id = "4590831" + to = github_team.release-engineers +} + +import { + id = "4590831" + to = github_team_members.release-engineers +} +import { + id = "2448370" + to = github_team.repo-creators +} + +import { + id = "2448370" + to = github_team_members.repo-creators +} +import { + id = "7625643" + to = github_team.reproducible +} + +import { + id = "7625643" + to = github_team_members.reproducible +} +import { + id = "4030006" + to = github_team.retired_nixpkgs_contributors +} + +import { + id = "4030006" + to = github_team_members.retired_nixpkgs_contributors +} +import { + id = "3051896" + to = github_team.rfc_steering_committee +} + +import { + id = "3051896" + to = github_team_members.rfc_steering_committee +} +import { + id = "6921873" + to = github_team.rocm-maintainers +} + +import { + id = "6921873" + to = github_team_members.rocm-maintainers +} +import { + id = "7304571" + to = github_team.rust +} + +import { + id = "7304571" + to = github_team_members.rust +} +import { + id = "2197543" + to = github_team.security +} + +import { + id = "2197543" + to = github_team_members.security +} +import { + id = "2189296" + to = github_team.security-notifications +} + +import { + id = "2189296" + to = github_team_members.security-notifications +} +import { + id = "5906550" + to = github_team.static +} + +import { + id = "5906550" + to = github_team_members.static +} +import { + id = "3894007" + to = github_team.systemd +} + +import { + id = "3894007" + to = github_team_members.systemd +} +import { + id = "9038534" + to = github_team.teams_collaboration +} + +import { + id = "9038534" + to = github_team_members.teams_collaboration +} +import { + id = "5421745" + to = github_team.xfce +} + +import { + id = "5421745" + to = github_team_members.xfce +} diff --git a/tofu/init.rb b/tofu/init.rb new file mode 100755 index 0000000..de3175c --- /dev/null +++ b/tofu/init.rb @@ -0,0 +1,103 @@ +#!/usr/bin/env ruby +# + +require "json" +require "pp" +require "shellwords" + +TF = "tofu" +ORG = "NixOS" + +# Just wrap `gh`, it's easier than to depend on Octokit +def gh(*args) + cmd = ["gh"] + args.map(&:to_s) + $stderr.puts "# #{cmd.shelljoin}" + IO.popen(cmd) do |io| + JSON.load(io, nil, create_additions: false, symbolize_names: true) + end +end + +def name_to_tf(name) + name.sub(/^[^a-zA-Z]/, "_").gsub(/[^\w-]/, "_").downcase +end + +def tf(*args) + cmd = [TF] + args.map(&:to_s) + $stderr.puts "# #{cmd.shelljoin}" + system(*cmd) +end + +def tf!(*args) + if !tf(*args) + throw "terraform command failed" + end +end + +### Import Organization settings + +org_id = gh(:api, "/orgs/#{ORG}", "--jq=.id") + +File.open("import_org.tf", "w") do |f| + f.puts(<<~EOM) + import { + id = "#{org_id}" + to = github_organization_settings.#{ORG} + } + EOM +end + +### Import REPOS ### + + +File.open("import_repos.tf", "w") do |f| + gh(:api, "/orgs/#{ORG}/repos?per_page=100&type=public&sort=full_name", "--paginate").each do |repo| + name = repo[:name] + id_name = name_to_tf(name) + + f.puts(<<~EOM) + import { + id = "#{name}" + to = github_repository.#{id_name} + } + + import { + id = "#{name}" + to = github_repository_collaborators.#{id_name} + } + + EOM + end +end + +### Import teams + +File.open("import_teams.tf", "w") do |f| + gh(:api, "/orgs/#{ORG}/teams?per_page=100", "--paginate").each do |team| + name = team[:name] + id = team[:id] + id_name = name_to_tf(name) + + # has_members = gh(:api, "/orgs/#{ORG}/team/#{id}/members?per_page=1").any? + # if not has_members then + # throw "NO MEMBERS, delete this team: #{name}" + # end + + f.puts(<<~EOM) + import { + id = "#{id}" + to = github_team.#{id_name} + } + + import { + id = "#{id}" + to = github_team_members.#{id_name} + } + EOM + end +end + +### Import the resources in the terraform state and generate the terraform resources + +File.delete("generated.tf") if File.exists?("generated.tf") + +tf!(:plan, "-generate-config-out=generated.tf") diff --git a/tofu/tofu_providers.tf b/tofu/tofu_providers.tf new file mode 100644 index 0000000..616d5e8 --- /dev/null +++ b/tofu/tofu_providers.tf @@ -0,0 +1,12 @@ +terraform { + required_providers { + github = { + source = "integrations/github" + version = "6.0.0" + } + } +} + +provider "github" { + owner = "NixOS" +}