17 lines
559 B
Nix
17 lines
559 B
Nix
{ config, lib, nodes, ... }:
|
|
{
|
|
imports = [ ./nginx ];
|
|
|
|
config = lib.mkIf config.services.owncast.enable {
|
|
services.owncast = {
|
|
port = 8060;
|
|
rtmp-port = 1945;
|
|
};
|
|
networking.firewall.extraInputRules = let
|
|
targetHosts = lib.attrValues (lib.mapAttrs (_: node: node.config.deployment.targetHost) nodes);
|
|
in ''
|
|
ip6 saddr { ${lib.concatStringsSep ", " targetHosts} } tcp dport ${toString config.services.owncast.rtmp-port} accept
|
|
'';
|
|
environment.persistence."/persist".directories = [ "/var/lib/owncast" ];
|
|
};
|
|
}
|