From 0f6c192663e4cf8ff1b7cebca6ba40fc4f9e1496 Mon Sep 17 00:00:00 2001 From: Isa Date: Fri, 6 Oct 2023 10:24:20 +0200 Subject: [PATCH 1/2] nextcloud27: 27.1.1 -> 27.1.2 (cherry picked from commit 0ad1a333f5d5d6d16ad0963a4422f7d3e0fa2092) --- pkgs/servers/nextcloud/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/nextcloud/default.nix b/pkgs/servers/nextcloud/default.nix index ec45f7565667f..33668b4ad937a 100644 --- a/pkgs/servers/nextcloud/default.nix +++ b/pkgs/servers/nextcloud/default.nix @@ -72,8 +72,8 @@ in { }; nextcloud27 = generic { - version = "27.1.1"; - hash = "sha256-OpFQBWaHRnVnb6O1v64lh6g5zeQd+sUxgEOxYsExH6s="; + version = "27.1.2"; + hash = "sha256-B0KyR6ruC3BE2wBi8KkUqnczjHp9j+faCRcUfXZolyE="; packages = nextcloud27Packages; }; From 9e429612a71e8f6ff104595453479c0135f0bc2d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 9 Oct 2023 12:36:05 +0200 Subject: [PATCH 2/2] nixos/nextcloud: fix ocm-provider for nc 27.1.2 This is not a directory anymore, but a dynamic HTTP route. --- nixos/modules/services/web-apps/nextcloud.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 703117b372b08..2e4973bb5afa8 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -60,6 +60,8 @@ let mysqlLocal = cfg.database.createLocally && cfg.config.dbtype == "mysql"; pgsqlLocal = cfg.database.createLocally && cfg.config.dbtype == "pgsql"; + # https://github.com/nextcloud/documentation/pull/11179 + ocmProviderIsNotAStaticDirAnymore = versionAtLeast cfg.package.version "27.1.2"; in { imports = [ @@ -1141,7 +1143,7 @@ in { "~ ^/(?:\\.(?!well-known)|autotest|occ|issue|indie|db_|console)".extraConfig = '' return 404; ''; - "~ ^\\/(?:index|remote|public|cron|core\\/ajax\\/update|status|ocs\\/v[12]|updater\\/.+|oc[ms]-provider\\/.+|.+\\/richdocumentscode\\/proxy)\\.php(?:$|\\/)" = { + "~ ^\\/(?:index|remote|public|cron|core\\/ajax\\/update|status|ocs\\/v[12]|updater\\/.+|oc[${optionalString (!ocmProviderIsNotAStaticDirAnymore) "m"}s]-provider\\/.+|.+\\/richdocumentscode\\/proxy)\\.php(?:$|\\/)" = { priority = 500; extraConfig = '' include ${config.services.nginx.package}/conf/fastcgi.conf; @@ -1164,7 +1166,7 @@ in { expires 6M; access_log off; ''; - "~ ^\\/(?:updater|ocs-provider|ocm-provider)(?:$|\\/)".extraConfig = '' + "~ ^\\/(?:updater|ocs-provider${optionalString (!ocmProviderIsNotAStaticDirAnymore) "|ocm-provider"})(?:$|\\/)".extraConfig = '' try_files $uri/ =404; index index.php; '';