diff --git a/nixos/modules/services/web-apps/outline.nix b/nixos/modules/services/web-apps/outline.nix index 3617aeff7272..2187f7a6ccd7 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}}" '' }