Add tandoor service.

This commit is contained in:
Kevin Baensch 2024-02-26 17:21:14 +01:00
parent 56d9b357b5
commit 8007a6de7f
Signed by: derped
GPG key ID: C0F1D326C7626543
3 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{
config,
lib,
...
}:
with lib;
let
tandoor = config.services.tandoor-recipes;
in {
vHost =
if tandoor.enable
then {
extraConfig = ''
location /media/ {
alias ${tandoor.extraConfig.MEDIA_ROOT};
}
location / {
proxy_pass http://${tandoor.address}:${toString tandoor.port};
proxy_set_header Host $host;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
'';
}
else {};
}
.vHost