l snapserver: add radio stream

This commit is contained in:
lassulus 2023-09-03 12:12:33 +02:00
parent bb29da9207
commit 63fc24339c
1 changed files with 20 additions and 3 deletions

View File

@ -2,12 +2,29 @@
{
services.snapserver = {
enable = true;
openFirewall = true;
streams = {
pipewire = {
# openFirewall = true;
streams = {
radio = {
type = "process";
location = pkgs.writers.writeDash "radio" ''
exec ${pkgs.mpv}/bin/mpv http://radio.lassul.us/radio.ogg \
--no-terminal \
--audio-display=no \
--audio-channels=stereo \
--audio-samplerate=48000 \
--audio-format=s16 \
--ao=pcm \
--ao-pcm-file=/dev/stdout
'';
};
styx = {
type = "pipe";
location = "/run/snapserver/snapfifo";
};
};
http.enable = true;
};
networking.firewall.interfaces.int0.allowedTCPPorts = [ 1704 1705 1780 ];
networking.firewall.interfaces.retiolum.allowedTCPPorts = [ 1780 ];
}