Compare commits

..
1 Commits
Author SHA1 Message Date
ahtlon d79e68fc0e [gitea_translater] add /health and monitor on overwatch
Hydra callback / on_push (pull_request) Skipped
Hydra callback / on_pr (pull_request) Successful in 7m17s
Check flake syntax / flake-check (push) Successful in 22m27s
2026-10-16 21:22:25 +02:00
8 changed files with 14 additions and 22 deletions
+1 -11
View File
@@ -26,14 +26,4 @@ Run ` lspci -k | grep -iA4 ethernet `
` [ ] `
*Example:*
`[ "r8169" ]`
## cfg.ip
I hate DHCP! Set static ip or ip = hosts.malobeo.hosts.${hostname}.network.address;
*Default:*
`Null` - Will error when not set
*Example:*
`hosts.malobeo.hosts.fanny.network.address;`
`[ "r8169" ]`
-1
View File
@@ -72,7 +72,6 @@ in
enable = true;
authorizedKeys = sshKeys.admins;
ethernetDrivers = ["e1000e"];
ip = hosts.malobeo.hosts.albert.network.address;
};
services.malobeo.vpn = {
+1
View File
@@ -20,6 +20,7 @@
services.malobeo.gitea-translator = {
enable = true;
host = "0.0.0.0";
};
services.hydra = {
-3
View File
@@ -2,8 +2,6 @@
let
sshKeys = import ../ssh_keys.nix;
hosts = import ../hosts.nix {};
in
{
imports =
@@ -37,7 +35,6 @@ in
enable = true;
authorizedKeys = sshKeys.admins;
ethernetDrivers = ["r8169"];
ip = hosts.malobeo.hosts.bakunin.network.address;
};
malobeo.users.malobeo = true;
-1
View File
@@ -90,7 +90,6 @@ in
authorizedKeys = sshKeys.admins;
ethernetDrivers = ["r8169"];
zfsExtraPools = [ "storage" ];
ip = hosts.malobeo.hosts.fanny.network.address;
};
boot.initrd = {
+1 -5
View File
@@ -27,10 +27,6 @@ in
default = [ ];
description = "Name or GUID of extra ZFS pools that you wish to import during boot.";
};
ip = lib.mkOption {
type = lib.types.str;
description = "The requested static ip for the machine";
};
};
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
@@ -77,7 +73,7 @@ in
"/etc/ssh/initrd" = "/etc/ssh/initrd";
};
};
kernelParams = [ "ip=${cfg.ip}::::${hostName}::" ];
kernelParams = [ "ip=::::${hostName}-initrd::dhcp" ];
};
};
}
+1
View File
@@ -145,6 +145,7 @@ in
"https://keys.malobeo.org"
"https://tasklist.malobeo.org"
"https://zines.malobeo.org"
"http://${hosts.malobeo.hosts.albert.network.address}:27364/health"
];
}];
+10 -1
View File
@@ -26,7 +26,7 @@ def _parse_response(baseurl, owner, repo):
return pulls
class PullsHandler(BaseHTTPRequestHandler):
_VALID_PATHS={"/", "/gitea-pulls-sorted.json"}
_VALID_PATHS={"/", "/gitea-pulls-sorted.json", "/health"}
# Class variables to store configuration
baseurl = None
@@ -34,6 +34,15 @@ class PullsHandler(BaseHTTPRequestHandler):
repo = None
def do_GET(self):
if self.path == "/health":
body=json.dumps({"status": "ok"}).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)
return
if self.path not in self._VALID_PATHS:
self.send_error(404, "Not Found")
return