From 2cd8a54e8eef2e31b67e30da94cdba0d8bf16d04 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Fri, 8 Dec 2023 18:50:07 +0100 Subject: [PATCH] fix(nextcloud): Last fix for memories and preview --- machines/compute01/nextcloud.nix | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/machines/compute01/nextcloud.nix b/machines/compute01/nextcloud.nix index fe40076..671f35c 100644 --- a/machines/compute01/nextcloud.nix +++ b/machines/compute01/nextcloud.nix @@ -1,6 +1,8 @@ { config, pkgs, ... }: -let host = "cloud.dgnum.eu"; +let + host = "cloud.dgnum.eu"; + nextcloud-occ = "${config.services.nextcloud.occ}/bin/nextcloud-occ"; in { services.nextcloud = { enable = true; @@ -74,12 +76,11 @@ in { updatechecker = false; allow_local_remote_servers = true; - }; - }; - systemd.services.nextcloud-preview = { - script = "${config.services.nextcloud.occ} preview:pre-generate -vvv"; - startAt = "*-*-* 01:00:00 UTC"; + "memories.exiftool" = "${pkgs.lib.getExe pkgs.exiftool}"; + "memories.vod.ffmpeg" = "${pkgs.lib.getExe pkgs.ffmpeg-headless}"; + "memories.vod.ffprobe" = "${pkgs.ffmpeg-headless}/bin/ffprobe"; + }; }; services.nginx.virtualHosts.${host} = { @@ -91,10 +92,17 @@ in { ''; }; - environment.systemPackages = with pkgs; [ - ffmpeg_6-headless - exiftool - ]; + systemd.services = { + nextcloud-preview = { + description = "Generate preview for nextcloud media."; + script = "${nextcloud-occ} preview:pre-generate -vvv"; + startAt = "*-*-* 01:00:00 UTC"; + }; + + nextcloud-cron.path = [ pkgs.perl ]; + }; + + environment.systemPackages = [ pkgs.ffmpeg_6-headless ]; dgn-secrets.matches."^nextcloud-.*$" = { owner = "nextcloud"; }; }