From 15a1d17c024b540c74814f9261c9fd0ed2985f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Mon, 20 Oct 2025 08:55:36 +0200 Subject: [PATCH] nixos/immich: fix missing parens in sql file creation --- nixos/modules/services/web-apps/immich.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/web-apps/immich.nix b/nixos/modules/services/web-apps/immich.nix index 194be5e89d75..21a92a5a627b 100644 --- a/nixos/modules/services/web-apps/immich.nix +++ b/nixos/modules/services/web-apps/immich.nix @@ -322,8 +322,8 @@ in "vector" "vchord" ]; - sqlFile = - pkgs.writeText "immich-pgvectors-setup.sql" '' + sqlFile = pkgs.writeText "immich-pgvectors-setup.sql" ( + '' ${lib.concatMapStringsSep "\n" (ext: "CREATE EXTENSION IF NOT EXISTS \"${ext}\";") extensions} ${lib.concatMapStringsSep "\n" (ext: "ALTER EXTENSION \"${ext}\" UPDATE;") extensions} ALTER SCHEMA public OWNER TO ${cfg.database.user}; @@ -331,7 +331,8 @@ in + lib.optionalString cfg.database.enableVectors '' ALTER SCHEMA vectors OWNER TO ${cfg.database.user}; GRANT SELECT ON TABLE pg_vector_index_stat TO ${cfg.database.user}; - ''; + '' + ); in [ ''