From e28a2e6988c7539fda5e2d2f8b0240e808587b02 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 13 Apr 2022 13:50:07 -0700 Subject: navidrome: use nginx for reverse proxy --- modules/services/navidrome/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/services/navidrome/default.nix b/modules/services/navidrome/default.nix index 98dd678..d813142 100644 --- a/modules/services/navidrome/default.nix +++ b/modules/services/navidrome/default.nix @@ -20,6 +20,20 @@ in { }; }; + services.nginx.virtualHosts."music.fcuny.xyz" = { + forceSSL = true; + useACMEHost = "music.fcuny.xyz"; + locations."/" = { + proxyPass = "http://127.0.0.1:4533"; + proxyWebsockets = true; + }; + }; + + security.acme.certs."music.fcuny.xyz" = { + dnsProvider = "gcloud"; + credentialsFile = secrets."acme/credentials".path; + }; + my.services.backup = { paths = [ "/var/lib/navidrome" ]; }; networking.firewall.allowedTCPPorts = [ 4533 ]; }; -- cgit 1.4.1