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
This commit is contained in:
Alyssa Ross
2025-05-05 20:06:00 +02:00
parent 0a072c9dec
commit afdbf499ac
+8 -2
View File
@@ -661,8 +661,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