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