diff --git a/modules/nocodb.nix b/modules/nocodb.nix index c0acc32..dede343 100644 --- a/modules/nocodb.nix +++ b/modules/nocodb.nix @@ -8,6 +8,15 @@ with lib; services = { nocodb = { enable = true; + environments = { + DB_URL="postgres:///nocodb?host=/run/postgresql"; + PORT = 9989; + NC_PUBLIC_URL = "https://${dn}"; + NC_SMTP_FROM = "no-reply@mail.tfcconnection.org"; + NC_SMTP_HOST = "mail.tfcconnection.org"; + NC_SMTP_PORT = 587; + NC_SMTP_USERNAME = "no-reply@mail.tfcconnection.org"; + } environmentFile = /nocoenv; }; }; @@ -15,7 +24,7 @@ with lib; forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://127.0.0.1:9989"; + proxyPass = "http://127.0.0.1:${toString config.services.nocodb.environments.PORT}"; proxyWebsockets = true; }; };