aboutsummaryrefslogtreecommitdiff
path: root/hosts/laurel/media.nix
blob: b5d45dcb971fa026597468e4ee1f4e3db19f8475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ config, lib, pkgs, ... }:

{
  services.jellyfin = {
    enable = true;
    openFirewall = true;
    group = "torrent";
  };
  services.nginx.virtualHosts."stream.${config.networking.hostName}" = {
    listen = [{ port = 80; addr = "0.0.0.0"; }];
    locations."/" = {
      proxyPass = "http://127.0.0.1:8096";
      proxyWebsockets = true;
    };
  };

  services.navidrome = {
    enable = true;
    openFirewall = true;
    settings = {
      MusicFolder = "/servarr/lidarr/";
      DataFolder = "/etc/navidrome/data";
      CacheFolder = "/etc/navidrome/cache";
      Address = "0.0.0.0";
      Port = 4533;
      AuthRequestLimit = 0;
      EnableTranscodingConfig = true;
    };
  };
  services.nginx.virtualHosts."music.${config.networking.hostName}" = {
    listen = [{ port = 80; addr = "0.0.0.0"; }];
    locations."/" = {
      proxyPass = "http://127.0.0.1:${builtins.toString config.services.navidrome.settings.Port}";
      proxyWebsockets = true;
    };
  };

}