feat(gitea): add elasticsearch

This commit is contained in:
winston 2023-07-03 21:25:18 +02:00
parent 8af5f0b589
commit 82a11c821f
Signed by: winston
GPG key ID: 3786770EDBC2B481
2 changed files with 19 additions and 3 deletions

View file

@ -22,7 +22,18 @@ in {
appName = "nekowinston's Gitea";
settings = {
indexer.REPO_INDEXER_ENABLED = true;
actions.ENABLED = true;
indexer = with config.services.elasticsearch; let
indexer = "elasticsearch";
conn = "http://${listenAddress}:${tostring port}";
in {
ISSUE_INDEXER_CONN_STR = conn;
ISSUE_INDEXER_TYPE = indexer;
REPO_INDEXER_CONN_STR = conn;
REPO_INDEXER_ENABLED = true;
REPO_INDEXER_TYPE = indexer;
};
repository = {
ENABLE_PUSH_CREATE_USER = true;
@ -69,6 +80,8 @@ in {
age.secrets."services/gitea/password-database".owner = "gitea";
services.elasticsearch.enable = true;
services.nginx.virtualHosts.${config.services.gitea.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = false;
@ -76,7 +89,7 @@ in {
locations."/" = with config.services.gitea.settings.server; {
extraConfig = "client_max_body_size 512M;";
proxyPass = "http://${HTTP_ADDR}:${toString HTTP_PORT}";
proxyPass = "http://${HTTP_ADDR}:${tostring HTTP_PORT}";
};
};
}

View file

@ -43,7 +43,10 @@
buildOn = "remote";
hermetic = false;
};
nixpkgs.overlays = [overlays];
nixpkgs = {
config.allowUnfree = true;
overlays = [overlays];
};
}
./hosts/main-node
./config