about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-13 13:50:07 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-13 13:50:07 -0700
commite28a2e6988c7539fda5e2d2f8b0240e808587b02 (patch)
tree6b1b3d18838a8478c5846bb8d3363b68ffbb384d /modules
parentgrafana: set proper port for reverse proxy (diff)
downloadworld-e28a2e6988c7539fda5e2d2f8b0240e808587b02.tar.gz
navidrome: use nginx for reverse proxy
Diffstat (limited to 'modules')
-rw-r--r--modules/services/navidrome/default.nix14
1 files changed, 14 insertions, 0 deletions
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 ];
   };