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" ];