Compare commits
2 Commits
f362bcb3e5
...
607f815480
Author | SHA1 | Date | |
---|---|---|---|
607f815480 | |||
cc884b94c4 |
@ -1,17 +1,19 @@
|
|||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
containers = {
|
containers = let
|
||||||
|
bindMounts = {
|
||||||
|
"/var/lib/music" = {
|
||||||
|
hostPath = "/media/storage/audio/library";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
radio-synthwave = {
|
radio-synthwave = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "10.231.136.1";
|
hostAddress = "10.231.136.1";
|
||||||
localAddress = "10.231.136.2";
|
localAddress = "10.231.136.2";
|
||||||
|
|
||||||
bindMounts = {
|
inherit bindMounts;
|
||||||
"/var/lib/music" = {
|
|
||||||
hostPath = "/home/l-nafaryus/Music";
|
|
||||||
isReadOnly = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
config,
|
config,
|
||||||
@ -57,12 +59,7 @@
|
|||||||
hostAddress = "10.231.136.1";
|
hostAddress = "10.231.136.1";
|
||||||
localAddress = "10.231.136.3";
|
localAddress = "10.231.136.3";
|
||||||
|
|
||||||
bindMounts = {
|
inherit bindMounts;
|
||||||
"/var/lib/music" = {
|
|
||||||
hostPath = "/home/l-nafaryus/Music";
|
|
||||||
isReadOnly = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
config,
|
config,
|
||||||
@ -101,6 +98,52 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
radio-hell-gates = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "10.231.136.1";
|
||||||
|
localAddress = "10.231.136.4";
|
||||||
|
|
||||||
|
inherit bindMounts;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.mpd = {
|
||||||
|
enable = true;
|
||||||
|
musicDirectory = "/var/lib/music";
|
||||||
|
network.listenAddress = "any";
|
||||||
|
#network.startWhenNeeded = true;
|
||||||
|
user = "mpd";
|
||||||
|
network.port = 6602;
|
||||||
|
extraConfig = ''
|
||||||
|
audio_output {
|
||||||
|
type "httpd"
|
||||||
|
name "Radio"
|
||||||
|
port "6662"
|
||||||
|
encoder "lame"
|
||||||
|
max_clients "0"
|
||||||
|
website "https://radio.elnafo.ru/hell-gates"
|
||||||
|
always_on "yes"
|
||||||
|
tags "yes"
|
||||||
|
bitrate "128"
|
||||||
|
format "44100:16:1"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = [6602 6662];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.elnafo-radio = {
|
services.elnafo-radio = {
|
||||||
@ -118,7 +161,7 @@
|
|||||||
{
|
{
|
||||||
id = "synthwave";
|
id = "synthwave";
|
||||||
name = "Synthwave";
|
name = "Synthwave";
|
||||||
host = "10.231.136.2";
|
host = config.containers.radio-synthwave.localAddress;
|
||||||
port = 6600;
|
port = 6600;
|
||||||
url = "https://radio.elnafo.ru/synthwave";
|
url = "https://radio.elnafo.ru/synthwave";
|
||||||
status = "Receive";
|
status = "Receive";
|
||||||
@ -127,21 +170,31 @@
|
|||||||
{
|
{
|
||||||
id = "non-stop-pop";
|
id = "non-stop-pop";
|
||||||
name = "Non-Stop-Pop";
|
name = "Non-Stop-Pop";
|
||||||
host = "10.231.136.3";
|
host = config.containers.radio-non-stop-pop.localAddress;
|
||||||
port = 6601;
|
port = 6601;
|
||||||
url = "https://radio.elnafo.ru/non-stop-pop";
|
url = "https://radio.elnafo.ru/non-stop-pop";
|
||||||
status = "Online";
|
status = "Online";
|
||||||
location = "Los Santos";
|
location = "Los Santos";
|
||||||
genre = "pop, r&b, dance music";
|
genre = "pop, r&b, dance music";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
id = "hell-gates";
|
||||||
|
name = "Hell Gates";
|
||||||
|
host = config.containers.radio-non-stop-pop.localAddress;
|
||||||
|
port = 6602;
|
||||||
|
url = "https://radio.elnafo.ru/hell-gates";
|
||||||
|
status = "Receive";
|
||||||
|
genre = "melodic death metal, death metal, metalcore";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."radio.elnafo.ru" = {
|
services.nginx.virtualHosts."radio.elnafo.ru" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = "elnafo.ru";
|
useACMEHost = "elnafo.ru";
|
||||||
locations."/".proxyPass = "http://127.0.0.1:54605";
|
locations."/".proxyPass = "http://${config.services.elnafo-radio.host}:${config.services.elnafo-radio.port}";
|
||||||
locations."/synthwave".proxyPass = "http://10.231.136.2:6660";
|
locations."/synthwave".proxyPass = "http://${config.containers.radio-synthwave.localAddress}:6660";
|
||||||
locations."/non-stop-pop".proxyPass = "http://10.231.136.3:6661";
|
locations."/non-stop-pop".proxyPass = "http://${config.containers.radio-non-stop-pop.localAddress}:6661";
|
||||||
|
locations."/hell-gates".proxyPass = "http://${config.containers.radio-non-stop-pop.localAddress}:6662";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user