From 36f3acac7896d40cbd73717f40dd66edbf5f5f97 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sun, 9 Apr 2023 00:41:21 -0400 Subject: [PATCH] Install Plex --- machines/perception/configuration.nix | 40 +++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/machines/perception/configuration.nix b/machines/perception/configuration.nix index 9768751..f97e511 100644 --- a/machines/perception/configuration.nix +++ b/machines/perception/configuration.nix @@ -2,7 +2,7 @@ { # Setup hardware - imports = [ inputs.nixos-hardware.nixosModules.common-cpu-intel ]; + # imports = [ inputs.nixos-hardware.nixosModules.common-cpu-intel ]; # Sops setup for this machine sops.secrets = { "borg-ssh-key" = { @@ -52,12 +52,46 @@ # Setup home manager home-manager.users.nathan = import ./home.nix; - ## Media Streaming setup - # First enable hardware acceleration + + # Setup hardware hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; + extraPackages = with pkgs; [ libva vaapiIntel libvdpau-va-gl vaapiVdpau ]; + }; + # Newer kernel + boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_2; + # Run plex and the like in containers + virtualisation.oci-containers.containers = { + # Configure plex + "plex" = { + image = "lscr.io/linuxserver/plex:latest"; + environment = { + "PUID" = "1000"; + "PGID" = "1000"; + "TZ" = "America/New_York"; + "VERSION" = "latest"; + }; + ports = [ + "32400:32400" + "1900:1900" + "3005:3005" + "5353:5353" + "8324:8324" + "32410:32410" + "32412:32412" + "32413:32413" + "32414:32414" + "32469:32469" + ]; + volumes = [ "/var/lib/plex:/config" "/mnt/plex:/media" ]; + extraOptions = [ "--device=/dev/dri:/dev/dri" ]; + }; + # Configure tatulli + # Configure sabnzbd + # Configure sonarr + # Configure radarr }; }