Merge pull request #171736 from arnottcr/nextcloud

nextcloud24: init at 24.0.0
This commit is contained in:
Maximilian Bosch 2022-05-18 12:14:01 +02:00 committed by GitHub
commit f1f849afb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 9 deletions

View File

@ -153,11 +153,11 @@ in {
package = mkOption {
type = types.package;
description = "Which package to use for the Nextcloud instance.";
relatedPackages = [ "nextcloud22" "nextcloud23" ];
relatedPackages = [ "nextcloud22" "nextcloud23" "nextcloud24" ];
};
phpPackage = mkOption {
type = types.package;
relatedPackages = [ "php74" "php80" ];
relatedPackages = [ "php74" "php80" "php81" ];
defaultText = "pkgs.php";
description = ''
PHP package to use for Nextcloud.
@ -568,7 +568,7 @@ in {
config = mkIf cfg.enable (mkMerge [
{ warnings = let
latest = 23;
latest = 24;
upgradeWarning = major: nixos:
''
A legacy Nextcloud install (from before NixOS ${nixos}) may be installed.
@ -604,6 +604,7 @@ in {
++ (optional (versionOlder cfg.package.version "21") (upgradeWarning 20 "21.05"))
++ (optional (versionOlder cfg.package.version "22") (upgradeWarning 21 "21.11"))
++ (optional (versionOlder cfg.package.version "23") (upgradeWarning 22 "22.05"))
++ (optional (versionOlder cfg.package.version "24") (upgradeWarning 23 "22.05"))
++ (optional isUnsupportedMariadb ''
You seem to be using MariaDB at an unsupported version (i.e. at least 10.6)!
Please note that this isn't supported officially by Nextcloud. You can either
@ -626,14 +627,15 @@ in {
''
else if versionOlder stateVersion "21.11" then nextcloud21
else if versionOlder stateVersion "22.05" then nextcloud22
else nextcloud23
else nextcloud24
);
services.nextcloud.datadir = mkOptionDefault config.services.nextcloud.home;
services.nextcloud.phpPackage =
if versionOlder cfg.package.version "21" then pkgs.php74
else pkgs.php80;
else if versionOlder cfg.package.version "24" then pkgs.php80
else pkgs.php81;
}
{ assertions = [
@ -884,7 +886,7 @@ in {
# FIXME(@Ma27) Nextcloud isn't compatible with mariadb 10.6,
# this is a workaround.
# See https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/22
settings = {
settings = mkIf (versionOlder cfg.package.version "24") {
mysqld = {
innodb_read_only_compressed = 0;
};

View File

@ -11,7 +11,7 @@
desktop client is packaged at <literal>pkgs.nextcloud-client</literal>.
</para>
<para>
The current default by NixOS is <package>nextcloud23</package> which is also the latest
The current default by NixOS is <package>nextcloud24</package> which is also the latest
major version available.
</para>
<section xml:id="module-services-nextcloud-basic-usage">

View File

@ -18,4 +18,4 @@ foldl
};
})
{ }
[ 22 23 ]
[ 22 23 24 ]

View File

@ -54,6 +54,12 @@ in {
version = "23.0.4";
sha256 = "67191c2b8b41591ae42accfb32216313fde0e107201682cb39029f890712bc6a";
};
nextcloud24 = generic {
version = "24.0.0";
sha256 = "176cb5620f20465fb4759bdf3caaebeb7acff39d6c8630351af9f8738c173780";
};
# tip: get she sha with:
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
}

View File

@ -8604,7 +8604,7 @@ with pkgs;
grocy = callPackage ../servers/grocy { };
inherit (callPackage ../servers/nextcloud {})
nextcloud21 nextcloud22 nextcloud23;
nextcloud21 nextcloud22 nextcloud23 nextcloud24;
nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client { };