2024-03-31 15:27:57 +00:00
|
|
|
{config, ...}: {
|
|
|
|
services.forgejo = {
|
2023-04-14 20:47:57 +00:00
|
|
|
enable = true;
|
|
|
|
lfs.enable = true;
|
|
|
|
database = {
|
|
|
|
type = "postgres";
|
|
|
|
passwordFile = config.age.secrets.gitea.path;
|
|
|
|
};
|
|
|
|
settings = {
|
|
|
|
service = {
|
2023-04-26 18:49:18 +00:00
|
|
|
DEFAULT_KEEP_EMAIL_PRIVATE = true;
|
|
|
|
DISABLE_REGISTRATION = true;
|
|
|
|
};
|
|
|
|
server = {
|
|
|
|
LANDING_PAGE = "explore";
|
|
|
|
ROOT_URL = "https://git.fainsin.bzh";
|
|
|
|
DOMAIN = "git.fainsin.bzh";
|
2023-04-14 20:47:57 +00:00
|
|
|
};
|
|
|
|
indexer = {
|
2023-04-26 18:49:18 +00:00
|
|
|
REPO_INDEXER_ENABLED = true;
|
|
|
|
REPO_INDEXER_PATH = "indexers/repos.bleve";
|
|
|
|
MAX_FILE_SIZE = 1048576;
|
|
|
|
REPO_INDEXER_EXCLUDE = "node_modules/**";
|
2023-04-14 20:47:57 +00:00
|
|
|
};
|
|
|
|
session = {
|
2023-04-26 18:49:18 +00:00
|
|
|
PROVIDER = "db";
|
|
|
|
COOKIE_SECURE = true;
|
2023-04-14 20:47:57 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."git.fainsin.bzh" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:3000/";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
2024-10-06 16:15:10 +00:00
|
|
|
|
|
|
|
services.gatus.settings.endpoints = [
|
|
|
|
{
|
|
|
|
name = "git.fainsin.bzh";
|
|
|
|
group = "services";
|
|
|
|
url = "https://git.fainsin.bzh";
|
|
|
|
interval = "5m";
|
|
|
|
conditions = [
|
|
|
|
"[STATUS] == 200"
|
|
|
|
"[RESPONSE_TIME] < 300"
|
|
|
|
"[CERTIFICATE_EXPIRATION] > 240h"
|
|
|
|
"[BODY] == pat(*<title>Explore - Forgejo: Beyond coding. We Forge.</title>*)"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
2023-04-14 20:47:57 +00:00
|
|
|
}
|