From 558d4428352fd3832cd6ca52a4d0ebb4912ff238 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Wed, 15 Oct 2025 22:28:04 +0900 Subject: [PATCH] nixos/tandoor-recipes: replace `preStart` with `ExecStartPre` --- nixos/modules/services/misc/tandoor-recipes.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/misc/tandoor-recipes.nix b/nixos/modules/services/misc/tandoor-recipes.nix index 549b3ad5fa3d..10d28c390a38 100644 --- a/nixos/modules/services/misc/tandoor-recipes.nix +++ b/nixos/modules/services/misc/tandoor-recipes.nix @@ -119,6 +119,12 @@ in after = lib.optional cfg.database.createLocally "postgresql.target"; serviceConfig = { + ExecStartPre = [ + "${lib.getExe' pkgs.coreutils "ln"} -sf ${manage} tandoor-recipes-manage" + + # Let django migrate the DB as needed + "${lib.getExe pkg} migrate" + ]; ExecStart = '' ${pkg.python.pkgs.gunicorn}/bin/gunicorn recipes.wsgi ''; @@ -172,13 +178,6 @@ in wantedBy = [ "multi-user.target" ]; - preStart = '' - ln -sf ${manage} tandoor-recipes-manage - - # Let django migrate the DB as needed - ${pkg}/bin/tandoor-recipes migrate - ''; - environment = env // { PYTHONPATH = "${pkg.python.pkgs.makePythonPath pkg.propagatedBuildInputs}:${pkg}/lib/tandoor-recipes"; };