From c609d530627c35d4446bf3a14fa43093a17d6f44 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 19 Jul 2026 20:01:53 +0700 Subject: [PATCH] add fix --- modules/system/homelab/gallery.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/system/homelab/gallery.nix b/modules/system/homelab/gallery.nix index 1b52208..c809408 100644 --- a/modules/system/homelab/gallery.nix +++ b/modules/system/homelab/gallery.nix @@ -1,4 +1,10 @@ { lib, ... }: { + # fix every update causing error: + # > microservices worker error: PostgresError: must be owner of function album_user_after_insert, stack: PostgresError: must be owner of function album_user_after_insert + systemd.services.postgresql.postStart = pkgs.lib.mkAfter '' + $PSQL -d immich -c "ALTER FUNCTION album_user_after_insert() OWNER TO immich;" || true + ''; + users.users.immich.extraGroups = [ "video" "render" ]; services = {