diff --git a/nixos/modules/services/web-apps/outline.nix b/nixos/modules/services/web-apps/outline.nix index e1bfa8ab47d3..6046b2005858 100644 --- a/nixos/modules/services/web-apps/outline.nix +++ b/nixos/modules/services/web-apps/outline.nix @@ -836,14 +836,12 @@ in ${ if (cfg.databaseUrl == "local") then '' - DATABASE_URL=${lib.escapeShellArg localPostgresqlUrl} - export DATABASE_URL - export PGSSLMODE=disable + export DATABASE_URL="''${DATABASE_URL:-${lib.escapeShellArg localPostgresqlUrl}}" + export PGSSLMODE="''${PGSSLMODE:-disable}" '' else '' - DATABASE_URL=${lib.escapeShellArg cfg.databaseUrl} - export DATABASE_URL + export DATABASE_URL="''${DATABASE_URL:-${lib.escapeShellArg cfg.databaseUrl}}" '' }