{ config, ... }: let cfg = config.services.navidrome; in { services.navidrome = { enable = true; settings = { MusicFolder = "/var/navidrome/music"; DataFolder = "/var/navidrome/data"; BaseUrl = "https://sorre.xyz/navidrome"; Port = 4533; Address = "127.0.0.1"; openFirewall = false; }; }; services.nginx = { enable = true; virtualHosts."sorre.xyz" = { enableACME = true; forceSSL = true; locations."^~ /navidrome" = { proxyPass = "http://127.0.0.1:${toString cfg.settings.Port}"; recommendedProxySettings = true; extraConfig = '' proxy_buffering off; ''; }; }; }; }