spec(eientei): photoprism switch to vaapi hwaccel

This commit is contained in:
514fpv 2024-03-07 21:54:15 +08:00
parent b8e0f5539c
commit c8406e885d
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

View file

@ -1,10 +1,11 @@
{ { lib
, ... }: with lib; {
services.photoprism = { services.photoprism = {
enable = true; enable = true;
originalsPath = "/run/storage/aerial"; originalsPath = "/run/storage/aerial";
settings = { settings = {
PHOTOPRISM_ADMIN_USER = "koishi"; PHOTOPRISM_ADMIN_USER = "koishi";
PHOTOPRISM_FFMPEG_ENCODER = "intel"; PHOTOPRISM_FFMPEG_ENCODER = "vaapi";
PHOTOPRISM_ORIGINALS_LIMIT = "-1"; PHOTOPRISM_ORIGINALS_LIMIT = "-1";
PHOTOPRISM_RESOLUTION_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 = [ environment.persistence."/nix/persist/fhs".directories = [
"/var/lib/photoprism" "/var/lib/photoprism"
]; ];