2021-05-22 22:45:05 +02:00
|
|
|
# A nice UI for various torrent clients
|
2024-06-21 17:38:32 +02:00
|
|
|
{ config, lib, ... }:
|
2021-05-22 22:45:05 +02:00
|
|
|
let
|
|
|
|
cfg = config.my.services.flood;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.my.services.flood = with lib; {
|
|
|
|
enable = mkEnableOption "Flood UI";
|
|
|
|
|
|
|
|
port = mkOption {
|
|
|
|
type = types.port;
|
|
|
|
default = 9092;
|
|
|
|
example = 3000;
|
|
|
|
description = "Internal port for Flood UI";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-06-21 17:38:32 +02:00
|
|
|
services.flood = {
|
|
|
|
enable = true;
|
2021-05-22 22:45:05 +02:00
|
|
|
|
2024-06-21 17:38:32 +02:00
|
|
|
inherit (cfg) port;
|
2021-05-22 22:45:05 +02:00
|
|
|
};
|
|
|
|
|
2023-12-25 19:25:08 +01:00
|
|
|
my.services.nginx.virtualHosts = {
|
|
|
|
flood = {
|
2021-08-24 23:05:10 +02:00
|
|
|
inherit (cfg) port;
|
2023-12-25 19:25:08 +01:00
|
|
|
};
|
|
|
|
};
|
2024-09-22 02:13:30 +02:00
|
|
|
|
|
|
|
# NOTE: unfortunately flood does not log connection failures for fail2ban
|
2021-05-22 22:45:05 +02:00
|
|
|
};
|
|
|
|
}
|