feat(gitea): add elasticsearch
This commit is contained in:
parent
8af5f0b589
commit
82a11c821f
2 changed files with 19 additions and 3 deletions
|
@ -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}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -43,7 +43,10 @@
|
|||
buildOn = "remote";
|
||||
hermetic = false;
|
||||
};
|
||||
nixpkgs.overlays = [overlays];
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
overlays = [overlays];
|
||||
};
|
||||
}
|
||||
./hosts/main-node
|
||||
./config
|
||||
|
|
Loading…
Reference in a new issue