nixos/tandoor-recipes: replace preStart with ExecStartPre

This commit is contained in:
h7x4
2025-10-27 18:52:19 +09:00
parent d85d382787
commit 558d442835
@@ -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";
};