2021-03-12 20:10:27 +01:00
|
|
|
{ config, ... }:
|
|
|
|
let
|
2021-04-08 21:39:39 +02:00
|
|
|
internal-ip = "192.168.111.11";
|
2021-12-10 08:48:36 +01:00
|
|
|
port = 4533;
|
2021-03-12 20:10:27 +01:00
|
|
|
in
|
|
|
|
{
|
2021-12-10 08:48:36 +01:00
|
|
|
services.navidrome.enable = true;
|
|
|
|
services.navidrome.settings = {
|
2022-06-06 21:08:21 +02:00
|
|
|
MusicFolder = "/media/cryptX/music/kinder";
|
2021-12-10 08:48:36 +01:00
|
|
|
Address = "0.0.0.0";
|
2021-03-12 20:10:27 +01:00
|
|
|
};
|
2023-07-17 21:14:15 +02:00
|
|
|
systemd.services.navidrome.serviceConfig = {
|
|
|
|
RequiresMountFor = [ "/media/cryptX" ];
|
|
|
|
Restart = "always";
|
|
|
|
|
|
|
|
RestartSec = "15";
|
|
|
|
};
|
2021-12-10 08:48:36 +01:00
|
|
|
|
|
|
|
state = [ "/var/lib/navidrome" ];
|
|
|
|
# networking.firewall.allowedTCPPorts = [ 4040 ];
|
|
|
|
# state = [ config.services.airsonic.home ];
|
|
|
|
services.nginx.virtualHosts."navidrome" = {
|
2021-03-12 20:10:27 +01:00
|
|
|
serverAliases = [
|
2021-12-10 08:48:36 +01:00
|
|
|
"navidrome.lan"
|
2021-03-12 20:10:27 +01:00
|
|
|
"music" "music.lan"
|
|
|
|
"musik" "musik.lan"
|
2022-10-30 08:51:18 +01:00
|
|
|
"music.omo.r"
|
|
|
|
"music.makefu.r" "music.makefu"
|
2021-03-12 20:10:27 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:${toString port}";
|
|
|
|
locations."/".proxyWebsockets = true;
|
|
|
|
};
|
2022-09-23 23:43:58 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [ port ];
|
2022-12-24 23:58:59 +01:00
|
|
|
# also configure dlna
|
|
|
|
services.minidlna.enable = true;
|
|
|
|
services.minidlna.settings = {
|
|
|
|
inotify = "yes";
|
|
|
|
friendly_name = "omo";
|
|
|
|
media_dir = [ "A,/media/cryptX/music" ];
|
|
|
|
};
|
2021-03-12 20:10:27 +01:00
|
|
|
}
|