From 6a4b07f036e811f3f9d79319c46b7597daa94ae4 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 29 Aug 2023 00:23:47 +0200 Subject: [PATCH] cluster/services/warehouse: workaround for ffmpeg config bug --- cluster/services/warehouse/host.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/cluster/services/warehouse/host.nix b/cluster/services/warehouse/host.nix index de23352..91dcd7a 100644 --- a/cluster/services/warehouse/host.nix +++ b/cluster/services/warehouse/host.nix @@ -24,13 +24,17 @@ with tools.nginx; enable = true; package = pkgs.intel-media-driver; }; - systemd.services.jellyfin.serviceConfig = { - # allow access to GPUs for hardware transcoding - DeviceAllow = lib.mkForce "char-drm"; - BindPaths = lib.mkForce "/dev/dri"; - # to allow restarting from web ui - Restart = lib.mkForce "always"; + systemd.services.jellyfin = { + # if EncoderAppPath is manually set in the web UI, it can never be updated through --ffmpeg + preStart = "test ! -e /var/lib/jellyfin/config/encoding.xml || sed -i '//d' /var/lib/jellyfin/config/encoding.xml"; + serviceConfig = { + # allow access to GPUs for hardware transcoding + DeviceAllow = lib.mkForce "char-drm"; + BindPaths = lib.mkForce "/dev/dri"; + # to allow restarting from web ui + Restart = lib.mkForce "always"; - Slice = "mediaplayback.slice"; + Slice = "mediaplayback.slice"; + }; }; }