nix/modules/services/immich/default.nix

28 lines
600 B
Nix
Raw Normal View History

2024-11-24 20:15:38 +01:00
{
domain,
lib,
config,
...
}: {
options = {
immich.enable = lib.mkEnableOption "";
2024-10-24 14:23:30 +02:00
};
2024-11-24 20:15:38 +01:00
config = lib.mkIf config.immich.enable {
services.nginx = {
virtualHosts."immich.${domain}" = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations."/".proxyPass = "http://localhost:2283";
};
};
services.immich = {
enable = true;
environment.IMMICH_MACHINE_LEARNING_URL = "http://localhost:3003";
};
users.users.immich.extraGroups = ["video" "render"];
2024-10-24 14:23:30 +02:00
};
}