3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #129620 from bbenno/update-nextcloud

nextcloud: init at 22.0.0; 21.0.2 -> 21.0.3; 20.0.7 -> 20.0.11
This commit is contained in:
Linus Heckemann 2021-07-12 20:53:35 +02:00 committed by GitHub
commit f7dff9c649
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 30 deletions

View file

@ -92,7 +92,7 @@ in {
package = mkOption {
type = types.package;
description = "Which package to use for the Nextcloud instance.";
relatedPackages = [ "nextcloud19" "nextcloud20" "nextcloud21" ];
relatedPackages = [ "nextcloud20" "nextcloud21" "nextcloud22" ];
};
maxUploadSize = mkOption {
@ -385,7 +385,7 @@ in {
];
warnings = let
latest = 21;
latest = 22;
upgradeWarning = major: nixos:
''
A legacy Nextcloud install (from before NixOS ${nixos}) may be installed.
@ -403,9 +403,9 @@ in {
Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
Please migrate your configuration to config.services.nextcloud.poolSettings.
'')
++ (optional (versionOlder cfg.package.version "19") (upgradeWarning 18 "20.09"))
++ (optional (versionOlder cfg.package.version "20") (upgradeWarning 19 "21.05"))
++ (optional (versionOlder cfg.package.version "21") (upgradeWarning 20 "21.05"));
++ (optional (versionOlder cfg.package.version "21") (upgradeWarning 20 "21.05"))
++ (optional (versionOlder cfg.package.version "22") (upgradeWarning 21 "21.11"));
services.nextcloud.package = with pkgs;
mkDefault (
@ -415,13 +415,13 @@ in {
nextcloud defined in an overlay, please set `services.nextcloud.package` to
`pkgs.nextcloud`.
''
else if versionOlder stateVersion "20.09" then nextcloud18
# 21.03 will not be an official release - it was instead 21.05.
# This versionOlder statement remains set to 21.03 for backwards compatibility.
# See https://github.com/NixOS/nixpkgs/pull/108899 and
# https://github.com/NixOS/rfcs/blob/master/rfcs/0080-nixos-release-schedule.md.
else if versionOlder stateVersion "21.03" then nextcloud19
else nextcloud21
else if versionOlder stateVersion "21.11" then nextcloud21
else nextcloud22
);
}
@ -616,9 +616,7 @@ in {
services.nginx.enable = mkDefault true;
services.nginx.virtualHosts.${cfg.hostName} = let
major = toInt (versions.major cfg.package.version);
in {
services.nginx.virtualHosts.${cfg.hostName} = {
root = cfg.package;
locations = {
"= /robots.txt" = {

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>nextcloud21</package> which is also the latest
The current default by NixOS is <package>nextcloud22</package> which is also the latest
major version available.
</para>
<section xml:id="module-services-nextcloud-basic-usage">

View file

@ -33,35 +33,29 @@ let
};
};
in {
nextcloud18 = throw ''
Nextcloud v18 has been removed from `nixpkgs` as the support for it was dropped
by upstream in 2021-01. Please upgrade to at least Nextcloud v19 by
nextcloud19 = throw ''
Nextcloud v19 has been removed from `nixpkgs` as the support for it was dropped
by upstream in 2021-06. Please upgrade to at least Nextcloud v20 by
declaring
services.nextcloud.package = pkgs.nextcloud19;
services.nextcloud.package = pkgs.nextcloud20;
in your NixOS config.
[1] https://docs.nextcloud.com/server/18/admin_manual/release_schedule.html
'';
# FIXME(@Ma27) remove on 21.05
nextcloud19 = generic {
version = "19.0.6";
sha256 = "sha256-pqqIayE0OyTailtd2zeYi+G1APjv/YHqyO8jCpq7KJg=";
extraVulnerabilities = [
"Nextcloud 19 is still supported, but CVE-2020-8259 & CVE-2020-8152 are unfixed! Please note that both CVEs only affect the file encryption module which is turned off by default. Alternatively, `pkgs.nextcloud20` can be used."
];
};
nextcloud20 = generic {
version = "20.0.7";
sha256 = "sha256-jO2Ct3K/CvZ9W+EyPkD5d0KbwKK8yGQJXvx4dnUAtys=";
version = "20.0.11";
sha256 = "sha256-CLrJH5eNTiJJrDzfCg+re3J2qmwxFOe12nUU/QgtD6A=";
};
nextcloud21 = generic {
version = "21.0.2";
sha256 = "5e5b38109a3485db5fd2d248f24478eabe6c0790ec10b030acbbee207d5511fe";
version = "21.0.3";
sha256 = "8adcd175c7a70c33332586fa9ce36d03ba02d1df5d4c334d1210201d3fb953ee";
};
nextcloud22 = generic {
version = "22.0.0";
sha256 = "sha256-ORHTdUw3rKfJtfOys3UTwPK1u5ea8AgWwRF7Hu28XXo=";
};
# tip: get she sha with:
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'

View file

@ -7281,7 +7281,7 @@ in
grocy = callPackage ../servers/grocy { };
inherit (callPackage ../servers/nextcloud {})
nextcloud18 nextcloud19 nextcloud20 nextcloud21;
nextcloud19 nextcloud20 nextcloud21 nextcloud22;
nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client { };