From 067db9bb0f46208dbc0bcfb80d4bfecc38cc5ceb Mon Sep 17 00:00:00 2001 From: 514fpv Date: Thu, 7 Mar 2024 21:54:15 +0800 Subject: [PATCH] fix(eientei): photoprism switch to vaapi hwaccel --- spec/eientei/photoprism.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spec/eientei/photoprism.nix b/spec/eientei/photoprism.nix index 55ccb7fe..5532320d 100644 --- a/spec/eientei/photoprism.nix +++ b/spec/eientei/photoprism.nix @@ -1,10 +1,11 @@ -{ +{ lib +, ... }: with lib; { services.photoprism = { enable = true; originalsPath = "/run/storage/aerial"; settings = { PHOTOPRISM_ADMIN_USER = "koishi"; - PHOTOPRISM_FFMPEG_ENCODER = "intel"; + PHOTOPRISM_FFMPEG_ENCODER = "vaapi"; PHOTOPRISM_ORIGINALS_LIMIT = "-1"; PHOTOPRISM_RESOLUTION_LIMIT = "-1"; }; @@ -23,6 +24,12 @@ }; }; + systemd.services.photoprism.serviceConfig = { + PrivateDevices = mkForce false; + DevicePolicy = "closed"; + DeviceAllow = [ "/dev/dri/renderD128 rw" ]; + }; + environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/photoprism" ];