From 28f90a1bf771ff13d19e0f8166c684366d0f1bde Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 9 Aug 2021 06:22:19 +0000 Subject: [PATCH] nixos/mailman: hyperkitty needs mailman-web-setup qcluster won't be happy if it's started before the database migrations have been run. 12:25:47 [Q] ERROR Failed to pull task from broker Traceback (most recent call last): File "/nix/store/w5ndmidmkiy02vvgl7cxx1fkzc1pichg-python3-3.12.9-env/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/w5ndmidmkiy02vvgl7cxx1fkzc1pichg-python3-3.12.9-env/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute return super().execute(query, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sqlite3.OperationalError: no such table: django_q_ormq (cherry picked from commit afdbf499ac20aa197485b6137978388b0d95df46) --- nixos/modules/services/mail/mailman.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix index 4588417322c8..044b508fd53b 100644 --- a/nixos/modules/services/mail/mailman.nix +++ b/nixos/modules/services/mail/mailman.nix @@ -664,8 +664,14 @@ in mailman-web-setup = { description = "Prepare mailman-web files and database"; - before = [ "mailman-uwsgi.service" ]; - requiredBy = [ "mailman-uwsgi.service" ]; + before = [ + "hyperkitty.service" + "mailman-uwsgi.service" + ]; + requiredBy = [ + "hyperkitty.service" + "mailman-uwsgi.service" + ]; restartTriggers = [ config.environment.etc."mailman3/settings.py".source ]; script = '' [[ -e "${webSettings.STATIC_ROOT}" ]] && find "${webSettings.STATIC_ROOT}/" -mindepth 1 -delete