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;