From 911ab3d7ba486273449c1e3a3554d47bb61c31eb Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Mon, 14 Oct 2024 15:15:25 +0000 Subject: [PATCH] Enable search --- mastodon.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mastodon.nix b/mastodon.nix index 536c05b..3be80d3 100644 --- a/mastodon.nix +++ b/mastodon.nix @@ -78,6 +78,15 @@ in { compression = "gzip"; }; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "elasticsearch" + ]; + + services.elasticsearch = { + enable = true; + package = pkgs.elasticsearch7; + }; + systemd.services.postgresqlBackup-mastodon.serviceConfig.ExecStartPost = pkgs.writeShellScript "backup-to-s3" '' cd /var/backup/postgresql @@ -151,6 +160,8 @@ in { passwordFile = builtins.toFile "smtp-password" secrets.smtpPassword; }; + elasticsearch.host = "localhost"; + vapidPublicKeyFile = builtins.toFile "vapidPublicKey" secrets.vapidPublicKey; secretKeyBaseFile = builtins.toFile "secretKeyBase" secrets.secretKeyBase; otpSecretFile = builtins.toFile "otpSecret" secrets.otpSecret;