From a635d4cbae322b10fe3b81d336bb159be95f1a51 Mon Sep 17 00:00:00 2001 From: Tim van Herpen Date: Wed, 17 Jun 2026 10:21:15 +0200 Subject: [PATCH] nixos/outline: allow DATABASE_URL override from environment --- nixos/modules/services/web-apps/outline.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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}}" '' }