2024-11-04 22:41:38 -05:00
|
|
|
{ pkgs, config, ... }:
|
|
|
|
{
|
|
|
|
services.liquidsoap.streams = {
|
|
|
|
jimscrap = pkgs.writeText "liquidjim" ''
|
|
|
|
settings.log.stdout.set(true)
|
|
|
|
settings.init.allow_root.set(true)
|
|
|
|
settings.scheduler.fast_queues.set(2)
|
|
|
|
|
|
|
|
# Define the source with random playlist
|
2024-11-13 03:43:51 -05:00
|
|
|
jimscrap = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimScrapped"))
|
2024-11-04 22:41:38 -05:00
|
|
|
|
|
|
|
# Ensure the stream never stops
|
|
|
|
jimscrap_fallback = fallback([jimscrap, jimscrap])
|
|
|
|
|
|
|
|
# Output configuration to Icecast
|
|
|
|
output.icecast(
|
|
|
|
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
|
|
|
host="127.0.0.1",
|
|
|
|
port=265,
|
|
|
|
password="${config.secrets.castSourcePass}",
|
|
|
|
public=true,
|
|
|
|
icy_metadata=["artist", "title"],
|
|
|
|
mount="jimscrap.opus",
|
|
|
|
encoding = "UTF-8",
|
|
|
|
jimscrap_fallback
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|