diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 64c17aa44b4a3..f74a50362dd1d 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -323,6 +323,15 @@ in { ''; }; + extraPackages = mkOption { + type = types.listOf types.package; + example = literalExpression "[ pkgs.ffmpeg ]"; + description = '' + Extra packages to make available to nextcloud's PATH. + Add `pkgs.ffmpeg` here to enable video thumbnail generation. + ''; + }; + phpExtraExtensions = mkOption { type = with types; functionTo (listOf package); default = all: []; @@ -1072,7 +1081,16 @@ in { phpPackage = phpPackage; phpEnv = { NEXTCLOUD_CONFIG_DIR = "${datadir}/config"; - PATH = "/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin"; + PATH = lib.makeBinPath ( + [ + "/run/wrappers" + "/nix/var/nix/profiles/default" + "/run/current-system/sw" + "/usr" + "" # adds "/bin" to PATH + ] + ++ cfg.extraPackages + ); }; settings = mapAttrs (name: mkDefault) { "listen.owner" = config.services.nginx.user;