From e05f4101c16f08058a14ac4335886567e1ffe987 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 8 Jul 2021 16:43:27 +0200 Subject: [PATCH] nextcloud22: init at 22.0.0 --- nixos/modules/services/web-apps/nextcloud.nix | 16 +++++++--------- nixos/modules/services/web-apps/nextcloud.xml | 2 +- pkgs/servers/nextcloud/default.nix | 5 +++++ pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 545deaa905f2..111b31734696 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -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" = { diff --git a/nixos/modules/services/web-apps/nextcloud.xml b/nixos/modules/services/web-apps/nextcloud.xml index 83a6f68edcbf..3af37b15dd56 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 nextcloud21 which is also the latest + The current default by NixOS is nextcloud22 which is also the latest major version available.
diff --git a/pkgs/servers/nextcloud/default.nix b/pkgs/servers/nextcloud/default.nix index 399294ce519a..1776987bae09 100644 --- a/pkgs/servers/nextcloud/default.nix +++ b/pkgs/servers/nextcloud/default.nix @@ -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' } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9bf8f552a5a9..502a2e9e348b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };