Commit 04e39de6 authored by Brendan Taylor's avatar Brendan Taylor
Browse files

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".
parent 1d8f13b2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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
        ];
      };
    };