From 04e39de6eb236b086e486193510069ffe683062b Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Sat, 28 Sep 2024 07:53:56 -0600 Subject: [PATCH] nixos/immich: do not set services.redis.servers.immich.user the redis module expects a user and group to exist with this name. previously if there was no group with the same name as `services.immich.user` the immich redis server would fail to start. instead we can use the redis module's default behaviour: it will create a user & group named "redis-immich". --- nixos/modules/services/web-apps/immich.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/immich.nix b/nixos/modules/services/web-apps/immich.nix index a8a222974fdc..7973adccb796 100644 --- a/nixos/modules/services/web-apps/immich.nix +++ b/nixos/modules/services/web-apps/immich.nix @@ -227,7 +227,6 @@ in services.redis.servers = mkIf cfg.redis.enable { immich = { enable = true; - user = cfg.user; port = cfg.redis.port; bind = mkIf (!isRedisUnixSocket) cfg.redis.host; }; @@ -286,6 +285,10 @@ in RuntimeDirectory = "immich"; User = cfg.user; Group = cfg.group; + # ensure that immich-server has permission to connect to the redis socket. + SupplementaryGroups = mkIf (cfg.redis.enable && isRedisUnixSocket) [ + config.services.redis.servers.immich.group + ]; }; };