Compare commits

..

12 Commits

Author SHA1 Message Date
malobot
aaf7af6457 Update flake.lock 2026-03-12 00:02:54 +00:00
dacdb2214e doppelups
All checks were successful
Weekly Flake Update / update_and_check_flake (push) Successful in 5m26s
2026-03-11 21:41:47 +01:00
b6e635d9e3 Revert "ups"
This reverts commit 20781b3b73.
2026-03-11 21:39:11 +01:00
20781b3b73 ups 2026-03-11 21:36:51 +01:00
a85f9cacde Add hydra files 2026-03-11 21:19:24 +01:00
72b2ae020a merge upstream 2026-03-10 18:52:07 +01:00
4b222ac4b0 miaou
All checks were successful
Weekly Flake Update / update_and_check_flake (push) Successful in 5m48s
2026-02-19 12:49:34 +01:00
a2b49bb36e bugh 2026-02-19 12:42:29 +01:00
9641ed68e2 gwah! 2026-02-19 12:32:41 +01:00
80a9fdb880 bleh 2026-02-19 02:31:46 +01:00
a07c47846e wehhhh 2026-02-19 02:25:58 +01:00
f1f8a3c908 fix?
Some checks failed
Weekly Flake Update / update_and_check_flake (push) Failing after 6m40s
2026-02-19 00:13:50 +01:00
16 changed files with 12 additions and 6392 deletions

View File

@@ -1,29 +0,0 @@
name: Weekly Flake Update
on:
pull_request:
types:
- opened
- synchronize
permissions:
contents: write
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- run: echo "Cat HEAD= $(cat .git/HEAD)"
- run: echo "Git parse HEAD= $(git rev-parse --abbrev-ref HEAD)"

View File

@@ -14,32 +14,10 @@ let
emailoverride = "";
keepnr = 1;
type = 1;
flake = "${info.head.repo.html_url}/archive/${info.head.ref}.tar.gz";
inputs = {
gitea_repo_name = {
type = "string";
value = "${info.head.repo.name}";
emailresponsible = false;
};
gitea_repo_owner = {
type = "string";
value = "${info.head.repo.owner.username}";
emailresponsible = false;
};
gitea_http_url = {
type = "string";
value = "https://git.dynamicdiscord.de";
emailresponsible = false;
};
gitea_status_repo = {
type = "string";
value = "${info.head.ref}";
emailresponsible = false;
};
};
flake = "gitea:git.dynamicdiscord.de/ahtlon/infrastructure/pulls/${num}";
}) prs;
mkFlakeJobset = branch: {
description = "Build ${branch} branch of the Malobeo Infrastructure repo";
description = "Build ${branch} branch of Simple NixOS MailServer";
checkinterval = 300;
enabled = "1";
schedulingshares = 100;
@@ -48,7 +26,7 @@ let
keepnr = 3;
hidden = false;
type = 1;
flake = "https://git.dynamicdiscord.de/malobeo/infrastructure/archive/${branch}.tar.gz";
flake = "git:simple-nixos-mailserver/nixos-mailserver/${branch}";
};
desc = prJobsets // {

View File

@@ -1,14 +1,14 @@
{
"enabled": 1,
"hidden": false,
"description": "Malobeo infrastructure repo",
"description": "Simple NixOS Mailserver",
"nixexprinput": "nixexpr",
"nixexprpath": ".hydra/declarative-jobsets.nix",
"checkinterval": 60,
"schedulingshares": 100,
"enableemail": false,
"emailoverride": "",
"keepnr": 5,
"keepnr": 3,
"type": 0,
"inputs": {
"nixexpr": {

View File

@@ -12,7 +12,6 @@
- [musik](./projekte/musik.md)
- [TODO](./todo.md)
- [Modules]()
- [Gitea-translator](./module/gitea-translator.md)
- [Initrd-ssh](./module/initssh.md)
- [Disks](./module/disks.md)
- [How-to]()

View File

@@ -1,21 +0,0 @@
# Gitea-tanslator
The module can be used by importing `inputs.self.nixosModules.malobeo.gitea-translator`
This module starts a python server that fetches the gitea pull request api and translates it to a file that hydra understands.
To use, just set the parameters of the gitea server, then send a GET request to either `http://${host}:${port}/` or `http://${host}:${port}/gitea-pulls-sorted.json`
## Module config
##### enable (default = false) - enables the module
##### baseurl (default = "git.dynamicdiscord.de") - Base URL of the Gitea instance
##### owner (default = "malobeo") - Repository owner
##### repo (default = "infrastructure") - Repository name
##### host (default = "127.0.0.1") - Address the server binds to
##### port (default = 27364) - Port the server listens on
## Hydra config
If you change the default port or host, the file `.hydra/spec.json` has to be modified accordingly.
With the module running on the hydra host, create a new hydra project, then:
- Set `Declarative spec file` to `.hydra/spec.json`
- Change declaritive input type to `Git checkout`
- Set your git repo location in the field below that

View File

@@ -1,350 +0,0 @@
{
"allow_maintainer_edit": false,
"assignee": null,
"assignees": null,
"base": {
"label": "master",
"ref": "master",
"repo": {
"allow_fast_forward_only_merge": false,
"allow_manual_merge": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_rebase_update": true,
"allow_squash_merge": true,
"archived": false,
"archived_at": "1970-01-01T01:00:00+01:00",
"autodetect_manual_merge": false,
"avatar_url": "",
"clone_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure.git",
"created_at": "2024-10-24T19:38:14+02:00",
"default_allow_maintainer_edit": false,
"default_branch": "master",
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"description": "",
"empty": false,
"fork": true,
"forks_count": 0,
"full_name": "ahtlon/infrastructure",
"has_actions": true,
"has_code": true,
"has_issues": false,
"has_packages": false,
"has_projects": false,
"has_pull_requests": true,
"has_releases": false,
"has_wiki": false,
"html_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure",
"id": 29,
"ignore_whitespace_conflicts": false,
"internal": false,
"language": "",
"languages_url": "https://git.dynamicdiscord.de/api/v1/repos/ahtlon/infrastructure/languages",
"licenses": [],
"link": "",
"mirror": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"name": "infrastructure",
"object_format_name": "sha1",
"open_issues_count": 0,
"open_pr_counter": 5,
"original_url": "",
"owner": {
"active": false,
"avatar_url": "https://git.dynamicdiscord.de/avatars/7399d018a0bcee0f2da113bdeeafec029316d8e8ce774b829de4125b026c0599",
"created": "2024-10-23T17:19:18+02:00",
"description": "",
"email": "ahtlon@noreply.git.dynamicdiscord.de",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "https://git.dynamicdiscord.de/ahtlon",
"id": 8,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "ahtlon",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "ahtlon",
"visibility": "public",
"website": ""
},
"parent": {
"allow_fast_forward_only_merge": false,
"allow_manual_merge": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_rebase_update": true,
"allow_squash_merge": true,
"archived": false,
"archived_at": "1970-01-01T01:00:00+01:00",
"autodetect_manual_merge": false,
"avatar_url": "",
"clone_url": "https://git.dynamicdiscord.de/malobeo/infrastructure.git",
"created_at": "2022-10-04T18:35:43+02:00",
"default_allow_maintainer_edit": false,
"default_branch": "master",
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"description": "",
"empty": false,
"fork": false,
"forks_count": 1,
"full_name": "malobeo/infrastructure",
"has_actions": true,
"has_code": true,
"has_issues": true,
"has_packages": false,
"has_projects": true,
"has_pull_requests": true,
"has_releases": true,
"has_wiki": true,
"html_url": "https://git.dynamicdiscord.de/malobeo/infrastructure",
"id": 15,
"ignore_whitespace_conflicts": false,
"internal": false,
"internal_tracker": {
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true,
"enable_time_tracker": true
},
"language": "",
"languages_url": "https://git.dynamicdiscord.de/api/v1/repos/malobeo/infrastructure/languages",
"licenses": [],
"link": "",
"mirror": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"name": "infrastructure",
"object_format_name": "sha1",
"open_issues_count": 40,
"open_pr_counter": 4,
"original_url": "",
"owner": {
"active": false,
"avatar_url": "https://git.dynamicdiscord.de/avatars/9ea8af20ca015cb078b2971cd4e91e6d",
"created": "2023-03-29T17:26:16+02:00",
"description": "",
"email": "",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "https://git.dynamicdiscord.de/malobeo",
"id": 7,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "malobeo",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "malobeo",
"visibility": "public",
"website": ""
},
"permissions": {
"admin": false,
"pull": true,
"push": false
},
"private": false,
"projects_mode": "",
"release_counter": 0,
"size": 2878,
"ssh_url": "ssh://gitea@git.dynamicdiscord.de:23428/malobeo/infrastructure.git",
"stars_count": 1,
"template": false,
"topics": [],
"updated_at": "2026-03-12T01:11:13+01:00",
"url": "https://git.dynamicdiscord.de/api/v1/repos/malobeo/infrastructure",
"watchers_count": 2,
"website": ""
},
"permissions": {
"admin": false,
"pull": true,
"push": false
},
"private": false,
"projects_mode": "all",
"release_counter": 0,
"size": 14507,
"ssh_url": "ssh://gitea@git.dynamicdiscord.de:23428/ahtlon/infrastructure.git",
"stars_count": 0,
"template": false,
"topics": [],
"updated_at": "2026-03-12T01:05:43+01:00",
"url": "https://git.dynamicdiscord.de/api/v1/repos/ahtlon/infrastructure",
"watchers_count": 1,
"website": ""
},
"repo_id": 29,
"sha": "dacdb2214ea6ff645c444ce0eaab68c317f0a616"
},
"body": "",
"closed_at": null,
"comments": 0,
"created_at": "2026-03-11T17:29:55+01:00",
"diff_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure/pulls/8.diff",
"draft": false,
"due_date": null,
"head": {
"label": "nixpkgs_bump_20260305",
"ref": "nixpkgs_bump_20260305",
"repo": {
"allow_fast_forward_only_merge": false,
"allow_manual_merge": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_rebase_update": true,
"allow_squash_merge": true,
"archived": false,
"archived_at": "1970-01-01T01:00:00+01:00",
"autodetect_manual_merge": false,
"avatar_url": "",
"clone_url": "https://git.dynamicdiscord.de/malobeo/infrastructure.git",
"created_at": "2022-10-04T18:35:43+02:00",
"default_allow_maintainer_edit": false,
"default_branch": "master",
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"description": "",
"empty": false,
"fork": false,
"forks_count": 1,
"full_name": "malobeo/infrastructure",
"has_actions": true,
"has_code": true,
"has_issues": true,
"has_packages": false,
"has_projects": true,
"has_pull_requests": true,
"has_releases": true,
"has_wiki": true,
"html_url": "https://git.dynamicdiscord.de/malobeo/infrastructure",
"id": 15,
"ignore_whitespace_conflicts": false,
"internal": false,
"internal_tracker": {
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true,
"enable_time_tracker": true
},
"language": "",
"languages_url": "https://git.dynamicdiscord.de/api/v1/repos/malobeo/infrastructure/languages",
"licenses": [],
"link": "",
"mirror": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"name": "infrastructure",
"object_format_name": "sha1",
"open_issues_count": 40,
"open_pr_counter": 4,
"original_url": "",
"owner": {
"active": false,
"avatar_url": "https://git.dynamicdiscord.de/avatars/9ea8af20ca015cb078b2971cd4e91e6d",
"created": "2023-03-29T17:26:16+02:00",
"description": "",
"email": "",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "https://git.dynamicdiscord.de/malobeo",
"id": 7,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "malobeo",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "malobeo",
"visibility": "public",
"website": ""
},
"permissions": {
"admin": false,
"pull": true,
"push": false
},
"private": false,
"projects_mode": "",
"release_counter": 0,
"size": 2878,
"ssh_url": "ssh://gitea@git.dynamicdiscord.de:23428/malobeo/infrastructure.git",
"stars_count": 1,
"template": false,
"topics": [],
"updated_at": "2026-03-12T01:11:13+01:00",
"url": "https://git.dynamicdiscord.de/api/v1/repos/malobeo/infrastructure",
"watchers_count": 2,
"website": ""
},
"repo_id": 15,
"sha": "7c66a24563d0e95c292aafeaa08056effc6152d9"
},
"html_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure/pulls/8",
"id": 66,
"is_locked": false,
"labels": [],
"merge_base": "344eeb437b0aa29baee1227e48878f987e21e296",
"merge_commit_sha": null,
"mergeable": true,
"merged": false,
"merged_at": null,
"merged_by": null,
"milestone": null,
"number": 8,
"patch_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure/pulls/8.patch",
"pin_order": 0,
"requested_reviewers": null,
"requested_reviewers_teams": null,
"state": "open",
"target_repo_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure.git",
"title": "Update flake.lock",
"updated_at": "2026-03-11T17:29:55+01:00",
"url": "https://git.dynamicdiscord.de/ahtlon/infrastructure/pulls/8",
"user": {
"active": false,
"avatar_url": "https://git.dynamicdiscord.de/avatars/7399d018a0bcee0f2da113bdeeafec029316d8e8ce774b829de4125b026c0599",
"created": "2024-10-23T17:19:18+02:00",
"description": "",
"email": "ahtlon@noreply.git.dynamicdiscord.de",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "https://git.dynamicdiscord.de/ahtlon",
"id": 8,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "ahtlon",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "ahtlon",
"visibility": "public",
"website": ""
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

12
flake.lock generated
View File

@@ -209,11 +209,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1773282481,
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
"lastModified": 1772963539,
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
"type": "github"
},
"original": {
@@ -225,11 +225,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1773375660,
"narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=",
"lastModified": 1773068389,
"narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776",
"rev": "44bae273f9f82d480273bab26f5c50de3724f52f",
"type": "github"
},
"original": {

View File

@@ -1,350 +0,0 @@
AAAAAA{
"allow_maintainer_edit": false,
"assignee": null,
"assignees": null,
"base": {
"label": "master",
"ref": "master",dd
"repo": {
"allow_fast_ddasdad_only_merge": false,
"allow_manual_merge": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_rebase_update": true,
"allow_squash_merge": true,
"archived": false,
"archived_at": "1970-01-01T01:00:00+01:00",
"autodetect_manual_merge": false,
"avatar_url": "",
"clone_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure.git",
"created_at": "2024-10-24T19:38:14+02:00",
"default_allow_maintainer_edit": false,
"default_branch": "master",
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"description": "",
"empty": false,
"fork": true,
"forks_count": 0,
"full_name": "ahtlon/infrastructure",
"has_actions": true,
"has_code": true,
"has_issues": false,
"has_packages": false,
"has_projects": false,
"has_pull_requests": true,
"has_releases": false,
"has_wiki": false,
"html_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure",
"id": 29,
"ignore_whitespace_conflicts": false,
"internal": false,
"language": "",
"languages_url": "https://git.dynamicdiscord.de/api/v1/repos/ahtlon/infrastructure/languages",
"licenses": [],
"link": "",
"mirror": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"name": "infrastructure",
"object_format_name": "sha1",
"open_issues_count": 0,
"open_pr_counter": 6,
"original_url": "",
"owner": {
"active": false,
"avatar_url": "https://git.dynamicdiscord.de/avatars/7399d018a0bcee0f2da113bdeeafec029316d8e8ce774b829de4125b026c0599",
"created": "2024-10-23T17:19:18+02:00",
"description": "",
"email": "ahtlon@noreply.git.dynamicdiscord.de",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "https://git.dynamicdiscord.de/ahtlon",
"id": 8,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "ahtlon",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "ahtlon",
"visibility": "public",
"website": ""
},
"parent": {
"allow_fast_forward_only_merge": false,
"allow_manual_merge": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_rebase_update": true,
"allow_squash_merge": true,
"archived": false,
"archived_at": "1970-01-01T01:00:00+01:00",
"autodetect_manual_merge": false,
"avatar_url": "",
"clone_url": "https://git.dynamicdiscord.de/malobeo/infrastructure.git",
"created_at": "2022-10-04T18:35:43+02:00",
"default_allow_maintainer_edit": false,
"default_branch": "master",
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"description": "",
"empty": false,
"fork": false,
"forks_count": 1,
"full_name": "malobeo/infrastructure",
"has_actions": true,
"has_code": true,
"has_issues": true,
"has_packages": false,
"has_projects": true,
"has_pull_requests": true,
"has_releases": true,
"has_wiki": true,
"html_url": "https://git.dynamicdiscord.de/malobeo/infrastructure",
"id": 15,
"ignore_whitespace_conflicts": false,
"internal": false,
"internal_tracker": {
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true,
"enable_time_tracker": true
},
"language": "",
"languages_url": "https://git.dynamicdiscord.de/api/v1/repos/malobeo/infrastructure/languages",
"licenses": [],
"link": "",
"mirror": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"name": "infrastructure",
"object_format_name": "sha1",
"open_issues_count": 40,
"open_pr_counter": 4,
"original_url": "",
"owner": {
"active": false,
"avatar_url": "https://git.dynamicdiscord.de/avatars/9ea8af20ca015cb078b2971cd4e91e6d",
"created": "2023-03-29T17:26:16+02:00",
"description": "",
"email": "",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "https://git.dynamicdiscord.de/malobeo",
"id": 7,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "malobeo",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "malobeo",
"visibility": "public",
"website": ""
},
"permissions": {
"admin": false,
"pull": true,
"push": false
},
"private": false,
"projects_mode": "",
"release_counter": 0,
"size": 2878,
"ssh_url": "ssh://gitea@git.dynamicdiscord.de:23428/malobeo/infrastructure.git",
"stars_count": 1,
"template": false,
"topics": [],
"updated_at": "2026-03-12T01:11:13+01:00",
"url": "https://git.dynamicdiscord.de/api/v1/repos/malobeo/infrastructure",
"watchers_count": 2,
"website": ""
},
"permissions": {
"admin": false,
"pull": true,
"push": false
},
"private": false,
"projects_mode": "all",
"release_counter": 0,
"size": 14584,
"ssh_url": "ssh://gitea@git.dynamicdiscord.de:23428/ahtlon/infrastructure.git",
"stars_count": 0,
"template": false,
"topics": [],
"updated_at": "2026-03-13T16:33:51+01:00",
"url": "https://git.dynamicdiscord.de/api/v1/repos/ahtlon/infrastructure",
"watchers_count": 1,
"website": ""
},
"repo_id": 29,
"sha": "e73516fbe79022d12608e9616b75b3a388bd0e5f"
},
"body": "",
"closed_at": null,
"comments": 0,
"created_at": "2026-03-11T17:29:55+01:00",
"diff_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure/pulls/8.diff",
"draft": false,
"due_date": null,
"head": {
"label": "nixpkgs_bump_20260305",
"ref": "nixpkgs_bump_20260305",
"repo": {
"allow_fast_forward_only_merge": false,
"allow_manual_merge": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_rebase_update": true,
"allow_squash_merge": true,
"archived": false,
"archived_at": "1970-01-01T01:00:00+01:00",
"autodetect_manual_merge": false,
"avatar_url": "",
"clone_url": "https://git.dynamicdiscord.de/malobeo/infrastructure.git",
"created_at": "2022-10-04T18:35:43+02:00",
"default_allow_maintainer_edit": false,
"default_branch": "master",
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"description": "",
"empty": false,
"fork": false,
"forks_count": 1,
"full_name": "malobeo/infrastructure",
"has_actions": true,
"has_code": true,
"has_issues": true,
"has_packages": false,
"has_projects": true,
"has_pull_requests": true,
"has_releases": true,
"has_wiki": true,
"html_url": "https://git.dynamicdiscord.de/malobeo/infrastructure",
"id": 15,
"ignore_whitespace_conflicts": false,
"internal": false,
"internal_tracker": {
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true,
"enable_time_tracker": true
},
"language": "",
"languages_url": "https://git.dynamicdiscord.de/api/v1/repos/malobeo/infrastructure/languages",
"licenses": [],
"link": "",
"mirror": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"name": "infrastructure",
"object_format_name": "sha1",
"open_issues_count": 40,
"open_pr_counter": 4,
"original_url": "",
"owner": {
"active": false,
"avatar_url": "https://git.dynamicdiscord.de/avatars/9ea8af20ca015cb078b2971cd4e91e6d",
"created": "2023-03-29T17:26:16+02:00",
"description": "",
"email": "",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "https://git.dynamicdiscord.de/malobeo",
"id": 7,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "malobeo",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "malobeo",
"visibility": "public",
"website": ""
},
"permissions": {
"admin": false,
"pull": true,
"push": false
},
"private": false,
"projects_mode": "",
"release_counter": 0,
"size": 2878,
"ssh_url": "ssh://gitea@git.dynamicdiscord.de:23428/malobeo/infrastructure.git",
"stars_count": 1,
"template": false,
"topics": [],
"updated_at": "2026-03-12T01:11:13+01:00",
"url": "https://git.dynamicdiscord.de/api/v1/repos/malobeo/infrastructure",
"watchers_count": 2,
"website": ""
},
"repo_id": 15,
"sha": "7c66a24563d0e95c292aafeaa08056effc6152d9"
},
"html_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure/pulls/8",
"id": 66,
"is_locked": false,
"labels": [],
"merge_base": "344eeb437b0aa29baee1227e48878f987e21e296",
"merge_commit_sha": null,
"mergeable": true,
"merged": false,
"merged_at": null,
"merged_by": null,
"milestone": null,
"number": 8,
"patch_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure/pulls/8.patch",
"pin_order": 0,
"requested_reviewers": null,
"requested_reviewers_teams": null,
"state": "open",
"target_repo_url": "https://git.dynamicdiscord.de/ahtlon/infrastructure.git",
"title": "Update flake.lock",
"updated_at": "2026-03-11T17:29:55+01:00",
"url": "https://git.dynamicdiscord.de/ahtlon/infrastructure/pulls/8",
"user": {
"active": false,
"avatar_url": "https://git.dynamicdiscord.de/avatars/7399d018a0bcee0f2da113bdeeafec029316d8e8ce774b829de4125b026c0599",
"created": "2024-10-23T17:19:18+02:00",
"description": "",
"email": "ahtlon@noreply.git.dynamicdiscord.de",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "https://git.dynamicdiscord.de/ahtlon",
"id": 8,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "ahtlon",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "ahtlon",
"visibility": "public",
"website": ""
}
}

View File

@@ -1,78 +0,0 @@
{ config, self, lib, inputs, pkgs, ... }:
with lib;
let
cfg = config.services.malobeo.gitea-translator;
in
{
options = {
services.malobeo.gitea-translator = {
enable = mkOption {
default = false;
type = types.bool;
description = lib.mdDoc "Start a webserver for hydra to use the gitea pull request api.";
};
baseurl = mkOption {
type = types.str;
default = "git.dynamicdiscord.de";
description = lib.mdDoc "Base URL of the Gitea instance.";
};
owner = mkOption {
type = types.str;
default = "malobeo";
description = lib.mdDoc "Repository owner on the Gitea instance.";
};
repo = mkOption {
type = types.str;
default = "infrastructure";
description = lib.mdDoc "Repository name on the Gitea instance.";
};
host = mkOption {
type = types.str;
default = "127.0.0.1";
description = lib.mdDoc "Address the server binds to.";
};
port = mkOption {
type = types.port;
default = 27364;
description = lib.mdDoc "Port the server listens on.";
};
};
};
config = mkIf cfg.enable {
systemd.services.gitea-translator = {
description = "Gitea Pull Request Translator for Hydra";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
${pkgs.python3}/bin/python3 ${inputs.self + /scripts/gitea_hydra_server.py} \
--baseurl ${cfg.baseurl} \
--owner ${cfg.owner} \
--repo ${cfg.repo} \
--host ${cfg.host} \
--port ${toString cfg.port}
'';
Restart = "on-failure";
RestartSec = 5;
# Hardening because why not
DynamicUser = true;
NoNewPrivileges = true;
ProtectSystem = "strict";
ProtectHome = true;
PrivateTmp = true;
PrivateDevices = true;
};
};
};
}

View File

@@ -32,7 +32,7 @@
"hetzner" = {
role = "client";
address = "10.100.0.7";
address = "10.100.0.6";
allowedIPs = [ "10.100.0.6/32" ];
publicKey = "csRzgwtnzmSLeLkSwTwEOrdKq55UOxZacR5D3GopCTQ=";
};

View File

@@ -1,107 +0,0 @@
#!/usr/bin/env python3
#imports
import os
import json
import argparse
from http.server import BaseHTTPRequestHandler, HTTPServer
import urllib.request
def _get_api_response(baseurl, owner, repo):
###https://docs.gitea.com/api/1.21/#tag/repository/operation/repoListPullRequests
###GET /api/v1/repos/{owner}/{repo}/pulls
url=(f"https://{baseurl}/api/v1/repos/{owner}/{repo}/pulls?state=open")
headers={"Accept": "application/json"}
req=urllib.request.Request(url, headers=headers)
with urllib.request.urlopen(req) as resp:
return json.loads(resp.read().decode("utf-8"))
def _parse_response(baseurl, owner, repo):
target_repo_url=f"https://{baseurl}/{owner}/{repo}.git"
pulls: dict={}
response=_get_api_response(baseurl, owner, repo)
for pr in response:
pr["target_repo_url"]=target_repo_url
pulls[str(pr["number"])]=pr
return pulls
class PullsHandler(BaseHTTPRequestHandler):
_VALID_PATHS={"/", "/gitea-pulls-sorted.json"}
# Class variables to store configuration
baseurl = None
owner = None
repo = None
def do_GET(self):
if self.path not in self._VALID_PATHS:
self.send_error(404, "Not Found")
return
answer=dict(_parse_response(self.baseurl, self.owner, self.repo))
body=json.dumps(answer, indent=2, sort_keys=True).encode("utf-8")
self.send_response(200)
self.send_header("Content-Type", "application/json; charset=utf-8")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def log_message(self, fmt, *args):
print(
f"[gitea-translator] {self.address_string()} - {fmt % args}",
flush=True,
)
def main():
parser = argparse.ArgumentParser(
description="Hydra Server to Gitea-pull-request translator"
)
parser.add_argument(
"--baseurl",
default="git.dynamicdiscord.de",
help="Base URL of Gitea instance (default: git.dynamicdiscord.de)"
)
parser.add_argument(
"--owner",
default="malobeo",
help="Repository owner (default: malobeo)"
)
parser.add_argument(
"--repo",
default="infrastructure",
help="Repository name (default: infrastructure)"
)
parser.add_argument(
"--host",
default="127.0.0.1",
help="Host to bind to (default: 127.0.0.1)"
)
parser.add_argument(
"--port",
type=int,
default=27364,
help="Port to bind to (default: 27364)"
)
args = parser.parse_args()
# Set class variables so they're accessible in request handlers
PullsHandler.baseurl = args.baseurl
PullsHandler.owner = args.owner
PullsHandler.repo = args.repo
print(
f"[gitea-translator] Starting, pulling from {args.baseurl}/{args.owner}/{args.repo}",
flush=True,
)
server=HTTPServer((args.host, args.port), PullsHandler)
print(
f"[gitea-translator] online @ {args.host}:{args.port}",
flush=True,
)
server.serve_forever()
if __name__ == "__main__":
main()

1
test
View File

@@ -1 +0,0 @@
1