1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 19:41:08 +01:00

anubis: weigh the souls of the AI scrapers

This commit is contained in:
2025-06-03 21:06:53 +02:00
parent f954e867dc
commit 7c3c13abb8

View File

@@ -1,20 +1,45 @@
{ config, ... }:
let let
inherit (import ../../lib) sshPort; inherit (import ../../lib) sshPort;
domain = "https://code.kmein.de"; domain = "code.kmein.de";
in { in {
services.anubis = {
defaultOptions.settings = {
USER_DEFINED_DEFAULT = true;
};
instances = {
"gitea".settings = {
TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
USER_DEFINED_INSTANCE = true;
OG_PASSTHROUGH = true;
SERVE_ROBOTS_TXT = true;
};
};
};
users.users.nginx.extraGroups = [ config.services.anubis.instances."gitea".group ];
services.gitea = { services.gitea = {
enable = true; enable = true;
appName = "code.kmein.de"; appName = domain;
settings = { settings = {
server.ROOT_URL = domain; server.ROOT_URL = "https://${domain}";
server.DOMAIN = domain;
server.SSH_PORT = sshPort; server.SSH_PORT = sshPort;
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
}; };
}; };
services.nginx.virtualHosts."code.kmein.de" = { services.nginx.virtualHosts.${domain} = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/".extraConfig = "proxy_pass http://localhost:3000;"; # locations."/".extraConfig = "proxy_pass http://localhost:3000;";
locations = {
"/" = {
proxyPass = "http://unix:${config.services.anubis.instances."gitea".settings.BIND}";
proxyWebsockets = true;
};
"/metrics".proxyPass = "http://unix:${config.services.anubis.instances."gitea".settings.METRICS_BIND}";
};
}; };
niveum.passport.services = [ niveum.passport.services = [