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,7 +1,6 @@
{ 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)
@ -28,5 +27,4 @@
jimbops_fallback jimbops_fallback
) )
''; '';
};
} }

View file

@ -1,13 +1,12 @@
{ 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)
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimBops")) jimscrapped = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/JimScrapped"))
jimbops_fallback = fallback([jimbops, jimbops]) jimscrapped_fallback = fallback([jimscrapped, jimscrapped])
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)),
@ -20,13 +19,12 @@
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";
'';
}; };
}; };
} }