From ad46c3321c3a7aeb6576a7446d047fb1e4bf317b Mon Sep 17 00:00:00 2001 From: Jimbo Date: Sat, 7 Sep 2024 11:40:18 -0400 Subject: [PATCH] Get rid of docker bc lag, move to Icecast. Temporary, I will make a web ui for this myself somehow --- nixos/hardware/machines/server.nix | 5 ----- nixos/server.nix | 1 - nixos/server/docker.nix | 16 ---------------- nixos/server/icecast.nix | 10 ++++++---- 4 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 nixos/server/docker.nix diff --git a/nixos/hardware/machines/server.nix b/nixos/hardware/machines/server.nix index 6011223..d806e35 100644 --- a/nixos/hardware/machines/server.nix +++ b/nixos/hardware/machines/server.nix @@ -86,11 +86,6 @@ fsType = "none"; options = [ "bind" ]; }; - "/var/lib/private/pufferpanel/servers" = { - device = "/export/JimboNFS/System/var/lib/pufferpanel/servers"; - fsType = "none"; - options = [ "bind" ]; - }; "/srv/minecraft" = { device = "/export/JimboNFS/System/srv/minecraft"; fsType = "none"; diff --git a/nixos/server.nix b/nixos/server.nix index 9ecb5be..55161f4 100644 --- a/nixos/server.nix +++ b/nixos/server.nix @@ -21,7 +21,6 @@ ./services/openssh.nix ./server/acme.nix ./server/ddclient.nix - ./server/docker.nix ./server/icecast.nix ./server/firewall.nix ./server/gitea.nix diff --git a/nixos/server/docker.nix b/nixos/server/docker.nix deleted file mode 100644 index d45b21b..0000000 --- a/nixos/server/docker.nix +++ /dev/null @@ -1,16 +0,0 @@ -{outputs, ...}: { - virtualisation.docker = { - enable = true; - daemon.settings.log-driver = "json-file"; - }; - - # Azuracast Nginx: TODO, get a better solution than docker lmao - services.nginx.virtualHosts."radio.${outputs.secrets.jimDomain}" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:255"; - proxyWebsockets = true; - }; - }; -} diff --git a/nixos/server/icecast.nix b/nixos/server/icecast.nix index 42926c7..a36833e 100644 --- a/nixos/server/icecast.nix +++ b/nixos/server/icecast.nix @@ -24,23 +24,25 @@ settings.decoder.file_extensions.mp4.set(["m4a", "m4b", "m4p", "m4v", "m4r", "3gp", "mp4"]) # Define the source with random playlist - jimbops = mksafe(normalize(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/"))) + jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/")) # Ensure the stream never stops jimbops_fallback = fallback([jimbops, jimbops]) # Output configuration to Icecast output.icecast( - %vorbis(channels=2, samplerate=48000, quality=0.8), + %ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)), host="127.0.0.1", port=265, password="${outputs.secrets.castSourcePass}", - description="JimBops Radio", + name = "JimBops Radio", + description = "Music gathered by me, Jimbo.", url="https://icecast.jimbosfiles.com/jimbops.opus", public=true, icy_metadata=["artist", "title"], - genre="My personal music folder.", + genre="Anything", mount="jimbops.opus", + encoding = "UTF-8", jimbops_fallback ) '';