Fix the liquidsoap stuff

This commit is contained in:
Jimbo 2025-01-01 16:54:27 -05:00
parent bb5250fef5
commit bf138bcd93
4 changed files with 65 additions and 54 deletions

View file

@ -3,7 +3,7 @@
services.ddclient = { services.ddclient = {
enable = config.system.server.enable; enable = config.system.server.enable;
protocol = "cloudflare"; protocol = "cloudflare";
use = "web, web=https://ipinfo.io/ip"; usev4 = "web, web=https://ipinfo.io/ip";
zone = "${config.domains.p1}"; zone = "${config.domains.p1}";
username = "token"; username = "token";
passwordFile = "${pkgs.writeText "cloudflareapikey" config.secrets.flareApiKey}"; passwordFile = "${pkgs.writeText "cloudflareapikey" config.secrets.flareApiKey}";

View file

@ -3,7 +3,6 @@
services = lib.mkIf config.system.server.enable { services = lib.mkIf config.system.server.enable {
samba = { samba = {
enable = true; enable = true;
securityType = "user";
openFirewall = true; openFirewall = true;
settings = { settings = {
global = { global = {

View file

@ -1,7 +1,8 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
services.liquidsoap.streams = lib.mkIf config.services.icecast.enable { config = lib.mkIf config.services.icecast.enable {
jimbops = pkgs.writeText "liquidstream1" '' services.liquidsoap.streams = {
jimbops = pkgs.writeText "jimbops" ''
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)
@ -16,11 +17,9 @@
password="${config.secrets.castSourcePass}", password="${config.secrets.castSourcePass}",
encoding = "UTF-8", encoding = "UTF-8",
radio="JimBops Radio", name="JimBops Radio",
genre="Anything", genre="Anything",
description="Music gathered by me, Jimbo.", description="Music gathered by me, Jimbo.",
website="https://icecast.${config.domains.p1}",
url="https://icecast.${config.domains.p1}/jimbops.opus",
mount="jimbops.opus", mount="jimbops.opus",
icy_metadata=["artist", "title"], icy_metadata=["artist", "title"],
public=true, public=true,
@ -29,4 +28,11 @@
) )
''; '';
}; };
# Avoid the most stupid error imaginable
systemd.services.jimbops = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
};
};
} }

View file

@ -1,7 +1,8 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
config = lib.mkIf config.services.icecast.enable {
services.liquidsoap.streams = lib.mkIf config.services.icecast.enable { services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
jimscrapped = pkgs.writeText "liquidstream2" '' jimscrapped = pkgs.writeText "jimscrapped" ''
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)
@ -16,11 +17,9 @@
password="${config.secrets.castSourcePass}", password="${config.secrets.castSourcePass}",
encoding = "UTF-8", encoding = "UTF-8",
radio="Jimbo's Scrap", name="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.p1}",
url="https://icecast.${config.domains.p1}/jimscrapped.opus",
mount="jimscrapped.opus", mount="jimscrapped.opus",
icy_metadata=["artist", "title"], icy_metadata=["artist", "title"],
public=true, public=true,
@ -29,4 +28,11 @@
) )
''; '';
}; };
# Avoid the most stupid error imaginable
systemd.services.jimscrapped = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
};
};
} }