From 1c79d48248f01d7bb4ec36345334f162574aa2eb Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 17 Sep 2025 10:11:39 +0200 Subject: [PATCH] module: run migrations before attempting to start worker `manage.py` attempts migrations on its own[1], so try let's try to prevent another potential for races. [1] https://github.com/goauthentik/authentik/blob/version/2025.8.3/manage.py#L17-L24 --- module.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.nix b/module.nix index 2104552..2e76d69 100644 --- a/module.nix +++ b/module.nix @@ -266,7 +266,7 @@ in requires = lib.optionals cfg.createDatabase [ "postgresql.service" ]; wants = [ "network-online.target" ]; after = [ "network-online.target" ] ++ lib.optionals cfg.createDatabase [ "postgresql.service" ]; - before = [ "authentik.service" ]; + before = [ "authentik.service" "authentik-migrate.service" ]; restartTriggers = [ config.environment.etc."authentik/config.yml".source ]; environment = mkMerge [ environment { TZ = tz; } ]; serviceConfig = mkMerge [