nur-update: fix gunicorn service
This commit is contained in:
parent
32c6762a14
commit
1264a5ac2d
1 changed files with 9 additions and 4 deletions
|
@ -9,14 +9,19 @@
|
||||||
|
|
||||||
sops.secrets.nur-update-github-token = { };
|
sops.secrets.nur-update-github-token = { };
|
||||||
|
|
||||||
systemd.services.nur-update = {
|
systemd.services.nur-update = let
|
||||||
description = "nur-update service";
|
python = pkgs.python3.withPackages
|
||||||
|
(ps: with ps; [
|
||||||
|
(ps.toPythonModule nur-update.packages.${pkgs.system}.default)
|
||||||
|
gunicorn
|
||||||
|
]);
|
||||||
|
in {
|
||||||
|
description = "nur-update";
|
||||||
script = ''
|
script = ''
|
||||||
GITHUB_TOKEN="$(<$CREDENTIALS_DIRECTORY/github-token)" \
|
GITHUB_TOKEN="$(<$CREDENTIALS_DIRECTORY/github-token)" \
|
||||||
${lib.getExe pkgs.python3.pkgs.gunicorn} nur_update:app \
|
${python}/bin/gunicorn nur_update:app \
|
||||||
--bind unix:/run/nur-update/gunicorn.sock \
|
--bind unix:/run/nur-update/gunicorn.sock \
|
||||||
--log-level info \
|
--log-level info \
|
||||||
--python-path ${nur-update.packages.${pkgs.system}.default} \
|
|
||||||
--timeout 30 \
|
--timeout 30 \
|
||||||
--workers 3
|
--workers 3
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue