diff --git a/config/hosts/git/default.nix b/config/hosts/git/default.nix index e2f517b..0f4664e 100644 --- a/config/hosts/git/default.nix +++ b/config/hosts/git/default.nix @@ -6,6 +6,7 @@ ./forgejo.nix ./networking.nix ./nginx.nix + ./opensearch.nix ./redis.nix ]; } diff --git a/config/hosts/git/forgejo.nix b/config/hosts/git/forgejo.nix index cd8477a..d571fb6 100644 --- a/config/hosts/git/forgejo.nix +++ b/config/hosts/git/forgejo.nix @@ -66,6 +66,13 @@ ADAPTER = "redis"; HOST = "redis+socket:///run/redis-forgejo/redis.sock"; }; + indexer = { + ISSUE_INDEXER_TYPE = "elasticsearch"; + ISSUE_INDEXER_CONN_STR = "http://127.0.0.1:9200"; + REPO_INDEXER_ENABLED = true; + REPO_INDEXER_TYPE = "elasticsearch"; + REPO_INDEXER_CONN_STR = "http://127.0.0.1:9200"; + }; }; }; diff --git a/config/hosts/git/opensearch.nix b/config/hosts/git/opensearch.nix new file mode 100644 index 0000000..1dc4490 --- /dev/null +++ b/config/hosts/git/opensearch.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + services.opensearch = { + enable = true; + }; + + systemd.services.forgejo = { + after = [ "opensearch.service" ]; + requires = [ "opensearch.service" ]; + }; +}