flakes/modules/nixos/services/arr/jellyseerr/default.nix
Chinmay D. Pai 4cb83f945d
feat: add fail2ban setup for services
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-10-05 21:00:53 +05:30

42 lines
1.1 KiB
Nix

{
config,
lib,
...
}: {
options.snowflake.services.jellyseerr = {
enable = lib.mkEnableOption "Enable jellyseerr deployment configuration";
};
config = lib.mkIf config.snowflake.services.jellyseerr.enable {
services.jellyseerr.enable = true;
services.jellyseerr.openFirewall = true;
services.nginx = {
virtualHosts = {
"seerr.deku.moe" = {
serverName = "seerr.deku.moe";
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:5055/";
};
};
};
};
environment.etc = {
jellyseerr = {
target = "fail2ban/filter.d/jellyseerr.conf";
text = ''
[INCLUDES]
before = common.conf
[Definition]
failregex = ^.*\[warn\]\[API\]: Failed sign-in attempt using invalid Overseerr password {"ip":"<HOST>","email":
^.*\[warn\]\[Auth\]: Failed login attempt from user with incorrect Jellyfin credentials {"account":{"ip":"<HOST>","email":
ignoreregex =
journalmatch = _SYSTEMD_UNIT=jellyseerr.service
'';
};
};
};
}