plex: update module
This commit is contained in:
parent
aa55bb115c
commit
6bdaacbc08
@ -1,16 +1,23 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
domain = "media.giugl.io";
|
domain = "plex.giugl.io";
|
||||||
network = import ./network.nix;
|
network = import ./network.nix;
|
||||||
|
port = 32400;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
architect.firewall = {
|
||||||
|
openTCP = [ 32400 3005 8324 32469 ];
|
||||||
|
openUDP = [ 1900 5353 32410 32412 32413 32414 ];
|
||||||
|
};
|
||||||
|
|
||||||
services.plex = {
|
services.plex = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.unstablePkgs.plex;
|
package = pkgs.unstablePkgs.plex;
|
||||||
dataDir = "/plex";
|
# dataDir = "/plex";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# give a name to the virtual host. It also becomes the server name.
|
# give a name to the virtual host. It also becomes the server name.
|
||||||
@ -19,10 +26,6 @@ in
|
|||||||
enableACME = true;
|
enableACME = true;
|
||||||
http2 = true;
|
http2 = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
allow 10.3.0.0/24;
|
|
||||||
allow 10.0.0.0/24;
|
|
||||||
deny all;
|
|
||||||
|
|
||||||
#Some players don't reopen a socket and playback stops totally instead of resuming after an extended pause
|
#Some players don't reopen a socket and playback stops totally instead of resuming after an extended pause
|
||||||
send_timeout 100m;
|
send_timeout 100m;
|
||||||
|
|
||||||
@ -77,8 +80,10 @@ in
|
|||||||
# Buffering off send to the client as soon as the data is received from Plex.
|
# Buffering off send to the client as soon as the data is received from Plex.
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
|
|
||||||
|
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
|
||||||
'';
|
'';
|
||||||
locations."/" = { proxyPass = "http://127.0.0.1:32400"; };
|
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user