aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn Behrens <me@kloenk.de>2020-11-14 19:04:44 +0100
committerFinn Behrens <me@kloenk.de>2020-11-19 20:18:55 +0100
commit23b0e5ba96e0a6a1d2fae94a37f3450058b709cf (patch)
tree12bbe0e21faa1c23a937f9d67dc03748b7277920
parentd0d229c2a7aefbf8ee95bfe8b27bfc5ff58dd292 (diff)
downloadbrook-master.tar.gz
brook-master.tar.xz
brook-master.zip
fix prosodyHEADmaster
-rw-r--r--nix/dash.nix23
-rw-r--r--nix/prosody.nix5
-rw-r--r--web/default.nix5
3 files changed, 25 insertions, 8 deletions
diff --git a/nix/dash.nix b/nix/dash.nix
index c0af4d7..d24e572 100644
--- a/nix/dash.nix
+++ b/nix/dash.nix
@@ -15,9 +15,16 @@ in
metadata in some clients
'';
};
+
+ openFirewall = mkEnableOption "open firewall";
};
config = mkIf cfg.dash.enable {
+ networking.firewall = mkIf cfg.dash.openFirewall {
+ allowedTCPPorts = [ 1935 ];
+ allowedUDPPorts = [ 1935 ];
+ };
+
systemd.services.brook-ffmpeg = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
@@ -31,13 +38,15 @@ in
ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg";
in
''
- ${ffmpeg}-listen 1 -i rtmp://0.0.0.0:1935/${cfg.dash.name}/live \
- -c:v libx264 -x264opts "keyint=24:min-keyint=24:no-scenecut" -r 24 \
- -c:a aac -b:a 128k \
- -bf 1 -b_strategy 0 -sc_threshold 0 -pix_fmt yuv420p \
- -map 0:v:0 -map 0:a:0 -map 0:v:0 \
- -map 0:a:0 -map 0:v:0 -map 0:a:0 \
- /var/lib/dash/live.mpd
+ while true; do
+ ${ffmpeg} -listen 1 -i rtmp://0.0.0.0:1935/${cfg.dash.name}/live \
+ -c:v libx264 -x264opts "keyint=24:min-keyint=24:no-scenecut" -r 24 \
+ -c:a aac -b:a 128k \
+ -bf 1 -b_strategy 0 -sc_threshold 0 -pix_fmt yuv420p \
+ -map 0:v:0 -map 0:a:0 -map 0:v:0 \
+ -map 0:a:0 -map 0:v:0 -map 0:a:0 \
+ /var/lib/dash/live.mpd
+ done
'';
};
};
diff --git a/nix/prosody.nix b/nix/prosody.nix
index 7915fa1..c83ea57 100644
--- a/nix/prosody.nix
+++ b/nix/prosody.nix
@@ -48,13 +48,16 @@ in
};
extraConfig = ''
authentication = "anonymous"
- http_host = ${cfg.prosody.guest-domain}
+ http_host = "${cfg.prosody.guest-domain}"
'';
};
#extraConfig = config.services.prosody.extraConfig + ''
# consider_bosh_secure = true
#'';
+ extraConfig = ''
+ consider_bosh_secure = true
+ '';
};
};
}
diff --git a/web/default.nix b/web/default.nix
index f292398..ad5c3f4 100644
--- a/web/default.nix
+++ b/web/default.nix
@@ -3,4 +3,9 @@
stdenv.mkDerivation {
name = "brook-web";
src = ./.;
+
+ installPhase = ''
+ mkdir $out
+ cp -r * $out
+ '';
}