Navidrome music server

This commit is contained in:
Aleksandr Lebedev 2025-10-02 13:21:27 +02:00
parent c44366f5ce
commit 7a1053586d
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,23 @@
{
pkgs,
lib,
config,
...
}: {
systemd.services.navidrome.serviceConfig.ExecStart = with lib; let
cfg = config.services.navidrome;
settingsFormat = pkgs.formats.toml {};
in
mkForce ''
${pkgs.bash}/bin/bash -c "${getExe cfg.package} --configfile '${settingsFormat.generate "navidrome.toml" cfg.settings}'"
'';
services.navidrome = {
enable = true;
settings = {
Scanner.Schedule = "@every 24h";
MusicFolder = "/zstorage/media/music";
EnableSharing = true;
BaseUrl = "https://music.kylekrein.com";
};
};
}

View file

@ -67,6 +67,18 @@ in {
};
};
"music.kylekrein.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${toString config.services.navidrome.settings.Address}:${toString config.services.navidrome.settings.Port}";
proxyWebsockets = true;
extraConfig = ''
client_max_body_size 100M;
'';
};
};
"${config.services.nextcloud.hostName}" = {
enableACME = true;
forceSSL = true;