From 4429b27b2605c3bf75c5c5db55d4d7f27220115e Mon Sep 17 00:00:00 2001 From: kubaneko Date: Wed, 23 Aug 2023 18:38:37 +0200 Subject: [PATCH] pretalx: fix pretalx-rebuild service --- modules/pretalx.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/pretalx.nix b/modules/pretalx.nix index c7de31866..b7c5faca6 100644 --- a/modules/pretalx.nix +++ b/modules/pretalx.nix @@ -418,8 +418,6 @@ in { environment.systemPackages = [ cfg.package - pkgs.tmux - pkgs.htop ]; environment.etc."pretalx/pretalx.cfg".text = let @@ -465,6 +463,7 @@ in { EnvironmentFile = environmentFile; User = cfg.user; Group = cfg.group; + WorkingDirectory = libDir; }; mkOneshot = command: { serviceConfig = oneshotServiceConfig; @@ -476,23 +475,19 @@ in { in { ${pretalxWebServiceName} = { serviceConfig = { - Type = "notify"; Restart = "on-failure"; EnvironmentFile = environmentFile; User = cfg.user; Group = cfg.group; + WorkingDirectory = libDir; }; script = '' ${exportPasswordEnv} - # ${cfg.package}/bin/pretalx compilemessages # FIXME: when run, pretalx-web hangs - ${cfg.package}/bin/pretalx collectstatic --noinput - ${cfg.package}/bin/pretalx compress - exec ${gunicorn}/bin/gunicorn pretalx.wsgi --name=${pretalxWebServiceName} --bind=${gunicornSocket} ${cfg.gunicorn.extraArgs} ''; wantedBy = ["multi-user.target"]; - requires = ["pretalx-init.service" "pretalx-web.socket"]; + requires = ["pretalx-init.service" "pretalx-rebuild.service" "pretalx-web.socket"]; after = ["pretalx-init.service"]; };