nix-flake/modules/system/homelab/gallery.nix
satr14 bcd8e6e7de
All checks were successful
Activate Homelab Configuration / rebuild (push) Successful in 4m12s
fix evaluation error
2026-07-20 11:21:16 +07:00

31 lines
No EOL
1.1 KiB
Nix

{ pkgs, 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 = {
immich = {
enable = true;
port = 2283;
host = "127.0.0.1";
mediaLocation = "/mnt/data/gallery";
accelerationDevices = null;
environment.DB_URL = lib.mkForce "postgresql:///immich?host=/var/run/postgresql&user=immich"; # https://github.com/immich-app/immich/issues/26140
machine-learning.enable = true;
redis.enable = true;
# settings = {
# newVersionCheck.enabled = true;
# server.externalDomain = "https://gallery.${homelab.domain}";
# };
};
immich-public-proxy = {
enable = true;
port = 2284;
immichUrl = "http://localhost:2283";
};
};
}