nextcloud22: init at 22.0.0

This commit is contained in:
Maximilian Bosch 2021-07-08 16:43:27 +02:00
parent b922990a8e
commit e05f4101c1
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
4 changed files with 14 additions and 11 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

@ -52,6 +52,11 @@ in {
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

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