❄️ Nix configurations
0
fork

Configure Feed

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

lets try

A. Ottr d22c7e6c 7dd08ef0

+92 -96
+89 -95
modules/nixos/server/plex.nix
··· 10 10 group = "media"; 11 11 }; 12 12 13 - # services.traefik.dynamicConfigOptions = { 14 - # http = { 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" ]; 25 - # }; 26 - # }; 27 - 28 - # services = { 29 - # plex = { 30 - # loadBalancer = { 31 - # passHostHeader = true; 32 - # serversTransport = "plexTransport"; 33 - # servers = [ { url = "http://127.0.0.1:32400"; } ]; 34 - # }; 35 - # }; 36 - # }; 13 + services.traefik.dynamicConfigOptions = { 14 + http = { 15 + middlewares = { 16 + plex-headers = { 17 + headers = { 18 + customRequestHeaders = { 19 + X-Real-IP = "{ClientIP}"; 20 + X-Forwarded-For = "{ClientIP}"; 21 + X-Forwarded-Proto = "https"; 22 + Host = "plex.otter.place"; 23 + Referer = "plex.otter.place"; 24 + Origin = "plex.otter.place"; 25 + X-Plex-Client-Identifier = ""; 26 + X-Plex-Device = ""; 27 + X-Plex-Device-Name = ""; 28 + X-Plex-Platform = ""; 29 + X-Plex-Platform-Version = ""; 30 + X-Plex-Product = ""; 31 + X-Plex-Token = ""; 32 + X-Plex-Version = ""; 33 + X-Plex-Nocache = ""; 34 + X-Plex-Provides = ""; 35 + X-Plex-Device-Vendor = ""; 36 + X-Plex-Model = ""; 37 + }; 38 + }; 39 + }; 37 40 38 - # middlewares = { 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 - # }; 48 - # }; 41 + plex-compress = { 42 + compress = { 43 + excludedContentTypes = [ 44 + "video/*" 45 + "audio/*" 46 + "image/*" 47 + ]; 48 + minResponseBodyBytes = 1000; 49 + }; 50 + }; 51 + }; 49 52 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 - # }; 53 + serversTransports.plex-transport.forwardingTimeouts = { 54 + dialTimeout = "30s"; 55 + responseHeaderTimeout = "6000s"; 56 + idleConnTimeout = "6000s"; 57 + }; 63 58 64 - # plex-buffering = { 65 - # buffering = { 66 - # maxRequestBodyBytes = 104857600; # 100M 67 - # }; 68 - # }; 69 - # }; 59 + routers = { 60 + plex = { 61 + entryPoints = [ "websecure" ]; 62 + rule = "Host(`plex.otter.place`)"; 63 + service = "plex"; 64 + middlewares = [ "plex-headers" "plex-compress" ]; 65 + tls = { 66 + certResolver = "letsencrypt"; 67 + options = "plex-tls"; 68 + }; 69 + }; 70 + }; 70 71 71 - # serversTransports = { 72 - # plexTransport = { 73 - # responseHeaderTimeout = "100m"; 74 - # idleTimeout = "100m"; 75 - # dialTimeout = "30s"; 76 - # }; 77 - # }; 78 - # }; 72 + services = { 73 + plex = { 74 + loadBalancer = { 75 + servers = [{ url = "http://localhost:32400"; }]; 76 + responseForwarding = { 77 + flushInterval = "1ms"; 78 + }; 79 + serversTransport = "plex-transport"; 80 + healthCheck = { 81 + path = "/web/index.html"; 82 + interval = "30s"; 83 + timeout = "10s"; 84 + scheme = "http"; 85 + }; 86 + }; 87 + }; 88 + }; 89 + }; 79 90 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 - # }; 111 - # }; 112 - # }; 91 + tls = { 92 + options = { 93 + plex-tls = { 94 + minVersion = "VersionTLS10"; 95 + maxVersion = "VersionTLS12"; 96 + preferServerCipherSuites = true; 97 + cipherSuites = [ 98 + "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" 99 + "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" 100 + "TLS_RSA_WITH_AES_128_GCM_SHA256" 101 + "TLS_RSA_WITH_AES_256_GCM_SHA384" 102 + ]; 103 + }; 104 + }; 105 + }; 106 + }; 113 107 }
+3 -1
modules/nixos/server/traefik.nix
··· 27 27 }; 28 28 29 29 log = { 30 - level = "INFO"; 30 + level = "DEBUG"; 31 31 filePath = "${config.services.traefik.dataDir}/traefik.log"; 32 32 format = "json"; 33 33 }; ··· 48 48 49 49 api.dashboard = true; 50 50 api.insecure = true; 51 + 52 + core.defaultRuleSyntax = "v3"; 51 53 }; 52 54 }; 53 55