{ pkgs, config, service_configs, lib, ... }: { imports = [ (lib.serviceMountWithZpool "bazarr" service_configs.zpool_ssds [ service_configs.bazarr.dataDir ]) (lib.serviceMountWithZpool "bazarr" service_configs.zpool_hdds [ service_configs.torrents_path ]) (lib.serviceFilePerms "bazarr" [ "Z ${service_configs.bazarr.dataDir} 0700 ${config.services.bazarr.user} ${config.services.bazarr.group}" ]) (lib.mkCaddyReverseProxy { subdomain = "bazarr"; port = service_configs.ports.private.bazarr.port; auth = true; }) ]; services.bazarr = { enable = true; listenPort = service_configs.ports.private.bazarr.port; }; users.users.${config.services.bazarr.user}.extraGroups = [ service_configs.media_group ]; }