From c40723cd6e27d5115cfc4d3af0472537af12d904 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 25 May 2023 21:36:24 +0200 Subject: [PATCH] add plex --- nixos/hosts/hades/default.nix | 11 ++++---- nixos/hosts/hades/nginx/configuration.nix | 6 +++-- nixos/hosts/hades/plex/configuration.nix | 31 +++++++++++++++++++++++ nixos/pkgs/plex-pass/sources.json | 12 ++++----- 4 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 nixos/hosts/hades/plex/configuration.nix diff --git a/nixos/hosts/hades/default.nix b/nixos/hosts/hades/default.nix index bfc14d8..7670659 100644 --- a/nixos/hosts/hades/default.nix +++ b/nixos/hosts/hades/default.nix @@ -102,13 +102,12 @@ ip = "192.168.0.119"; mac = "DE:7C:32:7E:DD:A1"; }; - # ip = "192.168.0.120"; - "jackett2" = { - ip = "192.168.0.121"; - mac = "4e:e7:64:b7:88:b8"; - profile = "jackett"; - nix = false; # superseded by prowlarr + "plex2" = { + ip = "192.168.0.120"; + mac = "A2:2C:65:32:54:8A"; + profile = "plex"; }; + # ip = "192.168.0.121"; "nginx" = { ip = "192.168.0.122"; mac = "52:8E:72:31:AE:AC"; diff --git a/nixos/hosts/hades/nginx/configuration.nix b/nixos/hosts/hades/nginx/configuration.nix index 68da0a1..3f53adc 100644 --- a/nixos/hosts/hades/nginx/configuration.nix +++ b/nixos/hosts/hades/nginx/configuration.nix @@ -83,7 +83,6 @@ in { forceSSL = true; enableACME = true; - proxyWebsockets = true; extraConfig = '' #Some players don't reopen a socket and playback stops totally instead of resuming after an extended pause @@ -128,7 +127,10 @@ in { proxy_redirect off; proxy_buffering off; ''; - locations."/" = { proxyPass = "http://plex2.hades:32400/"; }; + locations."/" = { + + proxyWebsockets = true; + proxyPass = "http://plex2.hades:32400/"; }; }; virtualHosts."fedi.xirion.net" = { diff --git a/nixos/hosts/hades/plex/configuration.nix b/nixos/hosts/hades/plex/configuration.nix new file mode 100644 index 0000000..e2ffbef --- /dev/null +++ b/nixos/hosts/hades/plex/configuration.nix @@ -0,0 +1,31 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ pkgs, ... }: + +{ + imports = [ ]; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "23.11"; # Did you read the comment? + + # Additional packages + environment.systemPackages = with pkgs; [ ]; + + services.plex = { + enable = true; + package = pkgs.plex-plexpass; + openFirewall = true; + }; + + fileSystems."/mnt/storage" = { + device = "storage:/mnt/storage"; + fsType = "nfs"; + }; +} diff --git a/nixos/pkgs/plex-pass/sources.json b/nixos/pkgs/plex-pass/sources.json index a505c01..e7fbf52 100644 --- a/nixos/pkgs/plex-pass/sources.json +++ b/nixos/pkgs/plex-pass/sources.json @@ -1,14 +1,14 @@ [ { - "version": "1.32.2.7100", + "version": "1.32.3.7089", "platform": "aarch64-linux", - "url": "https://downloads.plex.tv/plex-media-server-new/1.32.2.7100-248a2daf0/debian/plexmediaserver_1.32.2.7100-248a2daf0_arm64.deb", - "hash": "1rs967n4vli7gba2137l5z6vrdcdxfy3hni21lay3ayyds3xmavd" + "url": "https://downloads.plex.tv/plex-media-server-new/1.32.3.7089-b0a36929b/debian/plexmediaserver_1.32.3.7089-b0a36929b_arm64.deb", + "hash": "1sc6h04l0lxw3jzz01gn7i6wikqqds7nqh35rqvwhffjgdvmcjhq" }, { - "version": "1.32.2.7100", + "version": "1.32.3.7089", "platform": "x86_64-linux", - "url": "https://downloads.plex.tv/plex-media-server-new/1.32.2.7100-248a2daf0/debian/plexmediaserver_1.32.2.7100-248a2daf0_amd64.deb", - "hash": "0myr0nws0dhhkp9cc5zwxs4pigs7bmyf582fwskzjqm3d7phlwmi" + "url": "https://downloads.plex.tv/plex-media-server-new/1.32.3.7089-b0a36929b/debian/plexmediaserver_1.32.3.7089-b0a36929b_amd64.deb", + "hash": "074qvjl49rfn6s3naa5s71i5kd0an64laijz13cpsh55yy6zwgb3" } ]