Merge pull request #113958 from Ma27/nextcloud21
nextcloud21: init at 21.0.0, set as default version
This commit is contained in:
commit
594eff1d59
@ -573,14 +573,16 @@ self: super:
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The default-version of <literal>nextcloud</literal> is <package>nextcloud20</package>.
|
The default-version of <literal>nextcloud</literal> is <package>nextcloud21</package>.
|
||||||
Please note that it's <emphasis>not</emphasis> possible to upgrade <literal>nextcloud</literal>
|
Please note that it's <emphasis>not</emphasis> possible to upgrade <literal>nextcloud</literal>
|
||||||
across multiple major versions! This means that it's e.g. not possible to upgrade
|
across multiple major versions! This means that it's e.g. not possible to upgrade
|
||||||
from <package>nextcloud18</package> to <package>nextcloud20</package> in a single deploy.
|
from <package>nextcloud18</package> to <package>nextcloud20</package> in a single deploy and
|
||||||
|
most <literal>20.09</literal> users will have to upgrade to <package>nextcloud20</package>
|
||||||
|
first.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The package can be manually upgraded by setting <xref linkend="opt-services.nextcloud.package" />
|
The package can be manually upgraded by setting <xref linkend="opt-services.nextcloud.package" />
|
||||||
to <package>nextcloud20</package>.
|
to <package>nextcloud21</package>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -28,7 +28,10 @@ let
|
|||||||
upload_max_filesize = cfg.maxUploadSize;
|
upload_max_filesize = cfg.maxUploadSize;
|
||||||
post_max_size = cfg.maxUploadSize;
|
post_max_size = cfg.maxUploadSize;
|
||||||
memory_limit = cfg.maxUploadSize;
|
memory_limit = cfg.maxUploadSize;
|
||||||
} // cfg.phpOptions;
|
} // cfg.phpOptions
|
||||||
|
// optionalAttrs cfg.caching.apcu {
|
||||||
|
"apc.enable_cli" = "1";
|
||||||
|
};
|
||||||
|
|
||||||
occ = pkgs.writeScriptBin "nextcloud-occ" ''
|
occ = pkgs.writeScriptBin "nextcloud-occ" ''
|
||||||
#! ${pkgs.runtimeShell}
|
#! ${pkgs.runtimeShell}
|
||||||
@ -86,7 +89,7 @@ in {
|
|||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
description = "Which package to use for the Nextcloud instance.";
|
description = "Which package to use for the Nextcloud instance.";
|
||||||
relatedPackages = [ "nextcloud18" "nextcloud19" "nextcloud20" ];
|
relatedPackages = [ "nextcloud19" "nextcloud20" "nextcloud21" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
maxUploadSize = mkOption {
|
maxUploadSize = mkOption {
|
||||||
@ -280,6 +283,24 @@ in {
|
|||||||
may be served via HTTPS.
|
may be served via HTTPS.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultPhoneRegion = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
example = "DE";
|
||||||
|
description = ''
|
||||||
|
<warning>
|
||||||
|
<para>This option exists since Nextcloud 21! If older versions are used,
|
||||||
|
this will throw an eval-error!</para>
|
||||||
|
</warning>
|
||||||
|
|
||||||
|
<link xlink:href="https://www.iso.org/iso-3166-country-codes.html">ISO 3611-1</link>
|
||||||
|
country codes for automatic phone-number detection without a country code.
|
||||||
|
|
||||||
|
With e.g. <literal>DE</literal> set, the <literal>+49</literal> can be omitted for
|
||||||
|
phone-numbers.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
caching = {
|
caching = {
|
||||||
@ -345,10 +366,13 @@ in {
|
|||||||
&& !(acfg.adminpass != null && acfg.adminpassFile != null));
|
&& !(acfg.adminpass != null && acfg.adminpassFile != null));
|
||||||
message = "Please specify exactly one of adminpass or adminpassFile";
|
message = "Please specify exactly one of adminpass or adminpassFile";
|
||||||
}
|
}
|
||||||
|
{ assertion = versionOlder cfg.package.version "21" -> cfg.config.defaultPhoneRegion == null;
|
||||||
|
message = "The `defaultPhoneRegion'-setting is only supported for Nextcloud >=21!";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
warnings = let
|
warnings = let
|
||||||
latest = 20;
|
latest = 21;
|
||||||
upgradeWarning = major: nixos:
|
upgradeWarning = major: nixos:
|
||||||
''
|
''
|
||||||
A legacy Nextcloud install (from before NixOS ${nixos}) may be installed.
|
A legacy Nextcloud install (from before NixOS ${nixos}) may be installed.
|
||||||
@ -366,9 +390,9 @@ in {
|
|||||||
Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
|
Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
|
||||||
Please migrate your configuration to config.services.nextcloud.poolSettings.
|
Please migrate your configuration to config.services.nextcloud.poolSettings.
|
||||||
'')
|
'')
|
||||||
++ (optional (versionOlder cfg.package.version "18") (upgradeWarning 17 "20.03"))
|
|
||||||
++ (optional (versionOlder cfg.package.version "19") (upgradeWarning 18 "20.09"))
|
++ (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 "20") (upgradeWarning 19 "21.05"))
|
||||||
|
++ (optional (versionOlder cfg.package.version "21") (upgradeWarning 20 "21.05"));
|
||||||
|
|
||||||
services.nextcloud.package = with pkgs;
|
services.nextcloud.package = with pkgs;
|
||||||
mkDefault (
|
mkDefault (
|
||||||
@ -378,14 +402,13 @@ in {
|
|||||||
nextcloud defined in an overlay, please set `services.nextcloud.package` to
|
nextcloud defined in an overlay, please set `services.nextcloud.package` to
|
||||||
`pkgs.nextcloud`.
|
`pkgs.nextcloud`.
|
||||||
''
|
''
|
||||||
else if versionOlder stateVersion "20.03" then nextcloud17
|
|
||||||
else if versionOlder stateVersion "20.09" then nextcloud18
|
else if versionOlder stateVersion "20.09" then nextcloud18
|
||||||
# 21.03 will not be an official release - it was instead 21.05.
|
# 21.03 will not be an official release - it was instead 21.05.
|
||||||
# This versionOlder statement remains set to 21.03 for backwards compatibility.
|
# This versionOlder statement remains set to 21.03 for backwards compatibility.
|
||||||
# See https://github.com/NixOS/nixpkgs/pull/108899 and
|
# See https://github.com/NixOS/nixpkgs/pull/108899 and
|
||||||
# https://github.com/NixOS/rfcs/blob/master/rfcs/0080-nixos-release-schedule.md.
|
# https://github.com/NixOS/rfcs/blob/master/rfcs/0080-nixos-release-schedule.md.
|
||||||
else if versionOlder stateVersion "21.03" then nextcloud19
|
else if versionOlder stateVersion "21.03" then nextcloud19
|
||||||
else nextcloud20
|
else nextcloud21
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,6 +466,7 @@ in {
|
|||||||
'dbtype' => '${c.dbtype}',
|
'dbtype' => '${c.dbtype}',
|
||||||
'trusted_domains' => ${writePhpArrary ([ cfg.hostName ] ++ c.extraTrustedDomains)},
|
'trusted_domains' => ${writePhpArrary ([ cfg.hostName ] ++ c.extraTrustedDomains)},
|
||||||
'trusted_proxies' => ${writePhpArrary (c.trustedProxies)},
|
'trusted_proxies' => ${writePhpArrary (c.trustedProxies)},
|
||||||
|
${optionalString (c.defaultPhoneRegion != null) "'default_phone_region' => '${c.defaultPhoneRegion}',"}
|
||||||
];
|
];
|
||||||
'';
|
'';
|
||||||
occInstallCmd = let
|
occInstallCmd = let
|
||||||
@ -591,6 +615,14 @@ in {
|
|||||||
access_log off;
|
access_log off;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
"= /" = {
|
||||||
|
priority = 100;
|
||||||
|
extraConfig = ''
|
||||||
|
if ( $http_user_agent ~ ^DavClnt ) {
|
||||||
|
return 302 /remote.php/webdav/$is_args$args;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
"/" = {
|
"/" = {
|
||||||
priority = 900;
|
priority = 900;
|
||||||
extraConfig = "rewrite ^ /index.php;";
|
extraConfig = "rewrite ^ /index.php;";
|
||||||
@ -609,6 +641,9 @@ in {
|
|||||||
location = /.well-known/caldav {
|
location = /.well-known/caldav {
|
||||||
return 301 /remote.php/dav;
|
return 301 /remote.php/dav;
|
||||||
}
|
}
|
||||||
|
location ~ ^/\.well-known/(?!acme-challenge|pki-validation) {
|
||||||
|
return 301 /index.php$request_uri;
|
||||||
|
}
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
desktop client is packaged at <literal>pkgs.nextcloud-client</literal>.
|
desktop client is packaged at <literal>pkgs.nextcloud-client</literal>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The current default by NixOS is <package>nextcloud20</package> which is also the latest
|
The current default by NixOS is <package>nextcloud21</package> which is also the latest
|
||||||
major version available.
|
major version available.
|
||||||
</para>
|
</para>
|
||||||
<section xml:id="module-services-nextcloud-basic-usage">
|
<section xml:id="module-services-nextcloud-basic-usage">
|
||||||
|
@ -31,24 +31,19 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
nextcloud17 = throw ''
|
nextcloud18 = throw ''
|
||||||
Nextcloud v17 has been removed from `nixpkgs` as the support for it will be dropped
|
Nextcloud v18 has been removed from `nixpkgs` as the support for it was dropped
|
||||||
by upstream within the lifetime of NixOS 20.09[1]. Please upgrade to Nextcloud v18 by
|
by upstream in 2021-01. Please upgrade to at least Nextcloud v19 by
|
||||||
declaring
|
declaring
|
||||||
|
|
||||||
services.nextcloud.package = pkgs.nextcloud18;
|
services.nextcloud.package = pkgs.nextcloud19;
|
||||||
|
|
||||||
in your NixOS config.
|
in your NixOS config.
|
||||||
|
|
||||||
[1] https://docs.nextcloud.com/server/18/admin_manual/release_schedule.html
|
[1] https://docs.nextcloud.com/server/18/admin_manual/release_schedule.html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nextcloud18 = generic {
|
# FIXME(@Ma27) remove on 21.05
|
||||||
version = "18.0.10";
|
|
||||||
sha256 = "0kv9mdn36shr98kh27969b8xs7pgczbyjklrfskxy9mph7bbzir6";
|
|
||||||
eol = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
nextcloud19 = generic {
|
nextcloud19 = generic {
|
||||||
version = "19.0.6";
|
version = "19.0.6";
|
||||||
sha256 = "sha256-pqqIayE0OyTailtd2zeYi+G1APjv/YHqyO8jCpq7KJg=";
|
sha256 = "sha256-pqqIayE0OyTailtd2zeYi+G1APjv/YHqyO8jCpq7KJg=";
|
||||||
@ -61,4 +56,9 @@ in {
|
|||||||
version = "20.0.7";
|
version = "20.0.7";
|
||||||
sha256 = "sha256-jO2Ct3K/CvZ9W+EyPkD5d0KbwKK8yGQJXvx4dnUAtys=";
|
sha256 = "sha256-jO2Ct3K/CvZ9W+EyPkD5d0KbwKK8yGQJXvx4dnUAtys=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nextcloud21 = generic {
|
||||||
|
version = "21.0.0";
|
||||||
|
sha256 = "sha256-zq2u72doWhGvxbI7Coa6PHvQp7E41dHswFJiODZV8fA=";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -6580,7 +6580,7 @@ in
|
|||||||
grocy = callPackage ../servers/grocy { };
|
grocy = callPackage ../servers/grocy { };
|
||||||
|
|
||||||
inherit (callPackage ../servers/nextcloud {})
|
inherit (callPackage ../servers/nextcloud {})
|
||||||
nextcloud17 nextcloud18 nextcloud19 nextcloud20;
|
nextcloud18 nextcloud19 nextcloud20 nextcloud21;
|
||||||
|
|
||||||
nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client { };
|
nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user