nix-config/modules/nixos/services/flood/default.nix

32 lines
560 B
Nix
Raw Normal View History

2021-05-22 22:45:05 +02:00
# A nice UI for various torrent clients
{ 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 {
services.flood = {
enable = true;
2021-05-22 22:45:05 +02:00
inherit (cfg) port;
2021-05-22 22:45:05 +02:00
};
my.services.nginx.virtualHosts = {
flood = {
inherit (cfg) port;
};
};
2021-05-22 22:45:05 +02:00
};
}