From 2395e365db34e9176863982aca77972e28180ac3 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 18 Apr 2025 16:55:51 -0500 Subject: [PATCH] Tidy up vm-jellyfin Get drivers and firmware working for AMD passthru GPU Add jellyfin user to the groups to use card for transcription Update IP address --- hosts/genesis/net/hosts | 2 +- hosts/vm-jellyfin/default.nix | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/hosts/genesis/net/hosts b/hosts/genesis/net/hosts index de03200..4a76ff9 100644 --- a/hosts/genesis/net/hosts +++ b/hosts/genesis/net/hosts @@ -35,7 +35,7 @@ 100.90.74.19 jude.home 100.115.57.8 linode.home 100.65.5.38 matrix.home matrix.shire-zebra.ts.net -100.92.183.94 jellyfin.home +100.127.55.22 jellyfin.home # Dev hosts 10.42.101.1 icdm.lan wiki.icdm.lan *.icdm.lan diff --git a/hosts/vm-jellyfin/default.nix b/hosts/vm-jellyfin/default.nix index a31981c..f815cef 100644 --- a/hosts/vm-jellyfin/default.nix +++ b/hosts/vm-jellyfin/default.nix @@ -1,15 +1,17 @@ -{ lib, ... }: +{ pkgs, ... }: { imports = [ ./hardware-configuration.nix ]; # Bootloader. - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; + boot = { + initrd.kernelModules = [ "amdgpu" ]; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; }; - greg = { home = true; proxies."jellyfin.home".target = "http://localhost:8096/"; @@ -17,6 +19,15 @@ tailscale.enable = true; }; + environment.systemPackages = with pkgs; [ + clinfo + glxinfo + jellyfin-ffmpeg + libva-utils + radeontop + vulkan-tools + ]; + fileSystems = { "/music" = { device = "10.42.1.4:/volume1/music"; @@ -35,8 +46,17 @@ }; }; + hardware = { + enableAllFirmware = true; + enableRedistributableFirmware = true; + graphics = { + enable = true; + }; + }; + networking = { hostName = "vm-jellyfin"; + firewall.allowedTCPPorts = [ 80 ]; }; services = { @@ -46,4 +66,9 @@ }; qemuGuest.enable = true; }; + + users.users.jellyfin.extraGroups = [ + "video" + "render" + ]; }