❄️ Nix configurations
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

update plex conf

A. Ottr 806bd5f2 8d9fe918

+82 -78
+82 -78
modules/nixos/server/plex.nix
··· 12 12 13 13 services.traefik.dynamicConfigOptions = { 14 14 http = { 15 - routers.plex = { 16 - entryPoints = [ "websecure" ]; 17 - rule = "Host(`plex.otter.place`)"; 18 - service = "plex"; 19 - tls = { 20 - certResolver = "letsencrypt"; 21 - options = "plexTLS"; 15 + routers = { 16 + plex = { 17 + entryPoints = [ "websecure" ]; 18 + rule = "Host(`plex.otter.place`)"; 19 + service = "plex"; 20 + tls = { 21 + certResolver = "letsencrypt"; 22 + options = "plexTLS"; 23 + }; 24 + middlewares = [ "plex-headers" "plex-compress" "plex-buffering" ]; 22 25 }; 23 - middlewares = [ "plex-headers" "plex-compress" "plex-buffering" ]; 24 26 }; 25 27 26 - services.plex.loadBalancer = { 27 - passHostHeader = true; 28 - serversTransport = "plexTransport"; 29 - servers = [ { url = "http://127.0.0.1:32400"; } ]; 28 + services = { 29 + plex = { 30 + loadBalancer = { 31 + passHostHeader = true; 32 + serversTransport = "plexTransport"; 33 + servers = [ { url = "http://127.0.0.1:32400"; } ]; 34 + }; 35 + }; 30 36 }; 31 37 32 38 middlewares = { 33 - plex-headers.headers.customRequestHeaders = { 34 - X-Real-IP = "{remoteip}"; 35 - X-Forwarded-For = "{remoteip}"; 36 - X-Forwarded-Proto = "https"; 37 - Host = "{host}"; 38 - Referer = "{host}"; 39 - Origin = "{host}"; 40 - 41 - X-Plex-Client-Identifier = "{headers.X-Plex-Client-Identifier}"; 42 - X-Plex-Device = "{headers.X-Plex-Device}"; 43 - X-Plex-Device-Name = "{headers.X-Plex-Device-Name}"; 44 - X-Plex-Platform = "{headers.X-Plex-Platform}"; 45 - X-Plex-Platform-Version = "{headers.X-Plex-Platform-Version}"; 46 - X-Plex-Product = "{headers.X-Plex-Product}"; 47 - X-Plex-Token = "{headers.X-Plex-Token}"; 48 - X-Plex-Version = "{headers.X-Plex-Version}"; 49 - X-Plex-Nocache = "{headers.X-Plex-Nocache}"; 50 - X-Plex-Provides = "{headers.X-Plex-Provides}"; 51 - X-Plex-Device-Vendor = "{headers.X-Plex-Device-Vendor}"; 52 - X-Plex-Model = "{headers.X-Plex-Model}"; 53 - 54 - Upgrade = "{headers.Upgrade}"; 55 - Connection = "upgrade"; 39 + plex-headers = { 40 + headers = { 41 + customRequestHeaders = { 42 + Upgrade = "websocket"; 43 + Connection = "Upgrade"; 44 + # If Plex needs original scheme forwarded: 45 + X-Forwarded-Proto = "https"; 46 + }; 47 + }; 56 48 }; 57 49 58 - plex-compress.compress.includedContentTypes = [ 59 - "text/plain" 60 - "text/css" 61 - "text/xml" 62 - "application/xml" 63 - "text/javascript" 64 - "application/x-javascript" 65 - "image/svg+xml" 66 - "application/json" 67 - "application/javascript" 68 - ]; 50 + plex-compress = { 51 + compress = { 52 + includedContentTypes = [ 53 + "text/plain" 54 + "text/css" 55 + "text/xml" 56 + "application/xml" 57 + "application/json" 58 + "application/javascript" 59 + "image/svg+xml" 60 + ]; 61 + }; 62 + }; 69 63 70 - plex-buffering.buffering.maxRequestBodyBytes = 104857600; 64 + plex-buffering = { 65 + buffering = { 66 + maxRequestBodyBytes = 104857600; # 100M 67 + }; 68 + }; 71 69 }; 72 70 73 - serversTransports.plexTransport = { 74 - responseHeaderTimeout = "100m"; 75 - idleConnTimeout = "100m"; 76 - dialKeepAlive = "30s"; 71 + serversTransports = { 72 + plexTransport = { 73 + responseHeaderTimeout = "100m"; 74 + idleTimeout = "100m"; 75 + dialTimeout = "30s"; 76 + }; 77 77 }; 78 78 }; 79 79 80 - tls.options.plexTLS = { 81 - minVersion = "VersionTLS12"; 82 - preferServerCipherSuites = true; 83 - cipherSuites = [ 84 - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" 85 - "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" 86 - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" 87 - "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" 88 - "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" 89 - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" 90 - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" 91 - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" 92 - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" 93 - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" 94 - "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" 95 - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" 96 - "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" 97 - "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256" 98 - "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" 99 - "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256" 100 - "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" 101 - "TLS_RSA_WITH_AES_128_GCM_SHA256" 102 - "TLS_RSA_WITH_AES_256_GCM_SHA384" 103 - "TLS_RSA_WITH_AES_128_CBC_SHA256" 104 - "TLS_RSA_WITH_AES_256_CBC_SHA" 105 - "TLS_RSA_WITH_AES_128_CBC_SHA" 106 - ]; 80 + tls = { 81 + options = { 82 + plexTLS = { 83 + minVersion = "VersionTLS12"; 84 + preferServerCipherSuites = true; 85 + cipherSuites = [ 86 + "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" 87 + "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" 88 + "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" 89 + "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" 90 + "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" 91 + "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" 92 + "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" 93 + "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" 94 + "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" 95 + "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" 96 + "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" 97 + "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" 98 + "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" 99 + "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256" 100 + "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" 101 + "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256" 102 + "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" 103 + "TLS_RSA_WITH_AES_128_GCM_SHA256" 104 + "TLS_RSA_WITH_AES_256_GCM_SHA384" 105 + "TLS_RSA_WITH_AES_128_CBC_SHA256" 106 + "TLS_RSA_WITH_AES_256_CBC_SHA" 107 + "TLS_RSA_WITH_AES_128_CBC_SHA" 108 + ]; 109 + }; 110 + }; 107 111 }; 108 112 }; 109 113 }