feat(ops/nixos/camden): Enable RTMP support in nginx

This makes it possible to live-stream various things at rtmp://tazj.in/tvl
This commit is contained in:
Vincent Ambo 2020-04-04 01:38:51 +00:00
parent c3de37f54d
commit 9caf09a244

View file

@ -75,7 +75,7 @@ in lib.fix(self: {
networking = {
hostName = "camden";
interfaces.enp1s0.useDHCP = true;
firewall.allowedTCPPorts = [ 22 8080 80 443 ];
firewall.allowedTCPPorts = [ 22 8080 80 443 1935 ];
};
time.timeZone = "UTC";
@ -188,11 +188,35 @@ in lib.fix(self: {
services.nginx = {
enable = true;
enableReload = true;
package = with nixpkgs; nginx.override {
modules = [ nginxModules.rtmp ];
};
recommendedTlsSettings = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
appendConfig = ''
rtmp_auto_push on;
rtmp {
server {
listen 1935;
chunk_size 4000;
application tvl {
live on;
allow publish 88.98.195.213;
allow publish 10.0.1.0/24;
deny publish all;
allow play all;
}
}
}
'';
commonHttpConfig = ''
log_format json_combined escape=json
'{'