Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d79e68fc0e | ||
|
|
88ddae75e0 | ||
|
|
a0e664f4f5 |
@@ -86,6 +86,11 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.networks."05-unmanaged-docker" = {
|
||||
matchConfig = { Name = "veth*"; Kind = "veth"; };
|
||||
linkConfig = { Unmanaged = true; };
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "i686-linux" ];
|
||||
services.acpid.enable = true;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
services.malobeo.gitea-translator = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
};
|
||||
|
||||
services.hydra = {
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
sops.secrets.njalacloud = {};
|
||||
sops.secrets.njalazines = {};
|
||||
sops.secrets.njalaantamap = {};
|
||||
sops.secrets.njalarm16 = {};
|
||||
systemd.services."dyndns" = {
|
||||
script = ''
|
||||
KEYCLOUD=$(cat /run/secrets/njalacloud)
|
||||
KEYZINES=$(cat /run/secrets/njalazines)
|
||||
KEYANATAMAP=$(cat /run/secrets/njalaantamap)
|
||||
KEYRM16=$(cat /run/secrets/njalarm16)
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=cloud.malobeo.org&k="$KEYCLOUD"&auto"
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=zines.malobeo.org&k="$KEYZINES"&auto"
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=antamap.malobeo.org&k="$KEYANATAMAP"&auto"
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=rm16bleibt.org&k="$KEYRM16"&auto"
|
||||
'';
|
||||
serviceConfig = {
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
}];
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user