nixos/nextcloud: use php8 where possible

(cherry picked from commit 66edc1e84625ed5b4bed5868f4093a570a822c2e)
This commit is contained in:
Maximilian Bosch 2021-10-01 17:03:09 +02:00 committed by github-actions[bot]
parent d8e7c12bbd
commit c1541b370a

View File

@ -6,7 +6,7 @@ let
cfg = config.services.nextcloud;
fpm = config.services.phpfpm.pools.nextcloud;
phpPackage = pkgs.php74.buildEnv {
phpPackage = cfg.phpPackage.buildEnv {
extensions = { enabled, all }:
(with all;
enabled
@ -94,6 +94,14 @@ in {
description = "Which package to use for the Nextcloud instance.";
relatedPackages = [ "nextcloud19" "nextcloud20" "nextcloud21" "nextcloud22" ];
};
phpPackage = mkOption {
type = types.package;
relatedPackages = [ "php74" "php80" ];
defaultText = "pkgs.php";
description = ''
PHP package to use for Nextcloud.
'';
};
maxUploadSize = mkOption {
default = "512M";
@ -450,6 +458,10 @@ in {
else if versionOlder stateVersion "21.03" then nextcloud19
else nextcloud21
);
services.nextcloud.phpPackage =
if versionOlder cfg.package.version "21" then pkgs.php74
else pkgs.php80;
}
{ systemd.timers.nextcloud-cron = {