This commit is contained in:
Jimbo 2024-11-13 04:13:54 -05:00
parent 0cdc30cf8c
commit e43f8c27a1
3 changed files with 50 additions and 57 deletions

View file

@ -1,32 +1,30 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
services.liquidsoap.streams = { services.liquidsoap.streams.jimbops = pkgs.writeText "liquidstream1" ''
jimbops = pkgs.writeText "liquidjim" '' settings.log.stdout.set(true)
settings.log.stdout.set(true) settings.init.allow_root.set(true)
settings.init.allow_root.set(true) settings.scheduler.fast_queues.set(2)
settings.scheduler.fast_queues.set(2)
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimBops"))
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimBops")) jimbops_fallback = fallback([jimbops, jimbops])
jimbops_fallback = fallback([jimbops, jimbops])
output.icecast(
output.icecast( %ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)), host="127.0.0.1",
host="127.0.0.1", port=265,
port=265, password="${config.secrets.castSourcePass}",
password="${config.secrets.castSourcePass}", encoding = "UTF-8",
encoding = "UTF-8",
radio="JimBops Radio", radio="JimBops Radio",
genre = "Anything", genre = "Anything",
description="Music gathered by me, Jimbo.", description="Music gathered by me, Jimbo.",
website="https://icecast.${config.domains.jim1}", website="https://icecast.${config.domains.jim1}",
url="https://icecast.${config.domains.jim1}/jimbops.opus", url="https://icecast.${config.domains.jim1}/jimbops.opus",
mount="jimbops.opus", mount="jimbops.opus",
icy_metadata=["artist", "title"], icy_metadata=["artist", "title"],
public=true, public=true,
jimbops_fallback jimbops_fallback
) )
''; '';
};
} }

View file

@ -1,32 +1,30 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
services.liquidsoap.streams = { services.liquidsoap.streams.jimscrapped = pkgs.writeText "liquidstream2" ''
jimbops = pkgs.writeText "liquidjim" '' settings.log.stdout.set(true)
settings.log.stdout.set(true) settings.init.allow_root.set(true)
settings.init.allow_root.set(true) settings.scheduler.fast_queues.set(2)
settings.scheduler.fast_queues.set(2)
jimscrapped = 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")) jimscrapped_fallback = fallback([jimscrapped, jimscrapped])
jimbops_fallback = fallback([jimbops, jimbops])
output.icecast(
output.icecast( %ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)), host="127.0.0.1",
host="127.0.0.1", port=265,
port=265, password="${config.secrets.castSourcePass}",
password="${config.secrets.castSourcePass}", encoding = "UTF-8",
encoding = "UTF-8",
radio="Jimbo's Scrap", radio="Jimbo's Scrap",
genre = "Scrapped", genre = "Scrapped",
description="Music canned from the main radio.", description="Music canned from the main radio.",
website="https://icecast.${config.domains.jim1}", website="https://icecast.${config.domains.jim1}",
url="https://icecast.${config.domains.jim1}/jimscrap.opus", url="https://icecast.${config.domains.jim1}/jimscrapped.opus",
mount="jimscrap.opus", mount="jimscrapped.opus",
icy_metadata=["artist", "title"], icy_metadata=["artist", "title"],
public=true, public=true,
jimbops_fallback jimscrapped_fallback
) )
''; '';
};
} }

View file

@ -6,9 +6,6 @@
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:265"; proxyPass = "http://127.0.0.1:265";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = ''
add_header Ice-Public "1";
'';
}; };
}; };
} }