diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 87270776f5a6..52287a834c91 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -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; }; diff --git a/nixos/modules/services/web-apps/nextcloud.xml b/nixos/modules/services/web-apps/nextcloud.xml index 8f55086a2bd1..b46f34420a70 100644 --- a/nixos/modules/services/web-apps/nextcloud.xml +++ b/nixos/modules/services/web-apps/nextcloud.xml @@ -11,7 +11,7 @@ desktop client is packaged at pkgs.nextcloud-client. - The current default by NixOS is nextcloud23 which is also the latest + The current default by NixOS is nextcloud24 which is also the latest major version available.
diff --git a/nixos/tests/nextcloud/default.nix b/nixos/tests/nextcloud/default.nix index b7b1c5c66002..76feac314d5b 100644 --- a/nixos/tests/nextcloud/default.nix +++ b/nixos/tests/nextcloud/default.nix @@ -18,4 +18,4 @@ foldl }; }) { } - [ 22 23 ] + [ 22 23 24 ] diff --git a/pkgs/servers/nextcloud/default.nix b/pkgs/servers/nextcloud/default.nix index e71fb9db115e..5b88481d1d29 100644 --- a/pkgs/servers/nextcloud/default.nix +++ b/pkgs/servers/nextcloud/default.nix @@ -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' } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 751395aa0d4c..03ec203b696c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };