Bruno BELANYI
b73f6af5e0
All checks were successful
ci/woodpecker/push/check Pipeline was successful
32 lines
560 B
Nix
32 lines
560 B
Nix
# A nice UI for various torrent clients
|
|
{ config, lib, ... }:
|
|
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 {
|
|
services.flood = {
|
|
enable = true;
|
|
|
|
inherit (cfg) port;
|
|
};
|
|
|
|
my.services.nginx.virtualHosts = {
|
|
flood = {
|
|
inherit (cfg) port;
|
|
};
|
|
};
|
|
};
|
|
}
|