From e3a7270e3dd01891cefc37ae3a77351053660349 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Sun, 14 Feb 2021 21:10:54 +0300 Subject: [PATCH] nixos/mastodon: fix mastodon-init-db script --- nixos/modules/services/web-apps/mastodon.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index 4986dd2be53..37e5f7719b7 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -417,7 +417,7 @@ in { systemd.services.mastodon-init-db = lib.mkIf cfg.automaticMigrations { script = '' - if [ `psql mastodon -c \ + if [ `psql ${cfg.database.name} -c \ "select count(*) from pg_class c \ join pg_namespace s on s.oid = c.relnamespace \ where s.nspname not in ('pg_catalog', 'pg_toast', 'information_schema') \