From bf2933f57418afda5c9e6ccce8608f524c938aa4 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 30 Nov 2022 17:44:34 +0100 Subject: [PATCH] mastodon: add elasticsearch --- hosts/mastodon/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/mastodon/default.nix b/hosts/mastodon/default.nix index cbf7afe5..5b8c2b5a 100644 --- a/hosts/mastodon/default.nix +++ b/hosts/mastodon/default.nix @@ -14,8 +14,14 @@ }; c3d2.hq.statistics.enable = true; system.stateVersion = "22.11"; - + nixpkgs.config.allowUnfreePredicate = pkg: + lib.getName pkg == "elasticsearch"; + services.postgresql.enable = true; + services.elasticsearch = { + enable = true; + package = pkgs.elasticsearch7; + }; services.mastodon = { enable = true; localDomain = "c3d2.social"; @@ -28,6 +34,7 @@ # echo "${secrets.email.smtp-password}" > $out # ''}"; + elasticsearch.host = "127.0.0.1"; extraConfig = { ALTERNATE_DOMAINS = lib.concatStringsSep "," [