Separate Liquidsoap stream info from Icecast

This commit is contained in:
Jimbo 2024-11-13 04:10:42 -05:00
parent e0d8fd1473
commit 0cdc30cf8c
4 changed files with 26 additions and 40 deletions

View file

@ -20,7 +20,7 @@
};
swraid = {
enable = true;
mdadmConf = "MAILADDR jimbo@${config.domains.jim2}";
mdadmConf = "MAILADDR contact@${config.domains.jim2}";
};
};

View file

@ -19,27 +19,7 @@
</authentication>
<location>Canada</location>
<admin>jimbo@${config.domains.jim2}</admin>
<mount type="normal">
<mount-name>/jimbops.opus</mount-name>
<stream-name>JimBops Radio</stream-name>
<stream-description>Music gathered by me, Jimbo.</stream-description>
<stream-url>https://icecast.jimbosfiles.com/jimbops.opus</stream-url>
<genre>Anything</genre>
<type>application/ogg</type>
<subtype>vorbis</subtype>
</mount>
<mount type="normal">
<mount-name>/jimscrap.opus</mount-name>
<stream-name>Jimbo's Scrap</stream-name>
<stream-description>Music canned from the main radio.</stream-description>
<stream-url>https://icecast.jimbosfiles.com/jimscrap.opus</stream-url>
<genre>Scrapped</genre>
<type>application/ogg</type>
<subtype>vorbis</subtype>
</mount>
<admin>contact@${config.domains.jim2}</admin>
'';
};
}

View file

@ -6,22 +6,25 @@
settings.init.allow_root.set(true)
settings.scheduler.fast_queues.set(2)
# Define the source with random playlist
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimBops"))
# Ensure the stream never stops
jimbops_fallback = fallback([jimbops, jimbops])
# 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="jimbops.opus",
encoding = "UTF-8",
radio="JimBops Radio",
genre = "Anything",
description="Music gathered by me, Jimbo.",
website="https://icecast.${config.domains.jim1}",
url="https://icecast.${config.domains.jim1}/jimbops.opus",
mount="jimbops.opus",
icy_metadata=["artist", "title"],
public=true,
jimbops_fallback
)
'';

View file

@ -1,28 +1,31 @@
{ pkgs, config, ... }:
{
services.liquidsoap.streams = {
jimscrap = pkgs.writeText "liquidjim" ''
jimbops = 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
jimscrap = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimScrapped"))
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimBops"))
jimbops_fallback = fallback([jimbops, jimbops])
# 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
radio="Jimbo's Scrap",
genre = "Scrapped",
description="Music canned from the main radio.",
website="https://icecast.${config.domains.jim1}",
url="https://icecast.${config.domains.jim1}/jimscrap.opus",
mount="jimscrap.opus",
icy_metadata=["artist", "title"],
public=true,
jimbops_fallback
)
'';
};