git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/nextcloud: update upgrade-path for `nextcloud20`

Please note that this is only for 21.03 since `nextcloud19` is intended to be the default for the already feature-frozen 20.09 (the bump itself is supposed to get backported however).

commit5f67a62d595e217cc65e6e9ba7729e9924290737 authorMaximilian Bosch <maximilian@mbosch.me> dateSun 4 Oct 2020, 23:37 (6 years ago) parent71098fb
2 files changed+30−29
nixos/doc/manual/release-notes/rl-2103.xml+10−1 nixos/modules/services/web-apps/nextcloud.nix+20−28
nixos/doc/manual/release-notes/rl-2103.xml+10−1
@@ -75,7 +75,16 @@
7575
7676 <itemizedlist>
7777 <listitem>
78− <para />
78+ <para>
79+ The default-version of <literal>nextcloud</literal> is <package>nextcloud20</package>.
80+ Please note that it's <emphasis>not</emphasis> possible to upgrade <literal>nextcloud</literal>
81+ across multiple major versions! This means that it's e.g. not possible to upgrade
82+ from <package>nextcloud18</package> to <package>nextcloud20</package> in a single deploy.
83+ </para>
84+ <para>
85+ The package can be manually upgraded by setting <xref linkend="opt-services.nextcloud.package" />
86+ to <package>nextcloud20</package>.
87+ </para>
7988 </listitem>
8089 </itemizedlist>
8190 </section>
nixos/modules/services/web-apps/nextcloud.nix+20−28
@@ -330,37 +330,28 @@ in {
330330 }
331331 ];
332332
333− warnings = []
334− ++ (optional (cfg.poolConfig != null) ''
335− Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
336− Please migrate your configuration to config.services.nextcloud.poolSettings.
337− '')
338− ++ (optional (versionOlder cfg.package.version "18") ''
339− A legacy Nextcloud install (from before NixOS 20.03) may be installed.
340−
341− You're currently deploying an older version of Nextcloud. This may be needed
342− since Nextcloud doesn't allow major version upgrades that skip multiple
343− versions (i.e. an upgrade from 16 is possible to 17, but not 16 to 18).
344−
345− It is assumed that Nextcloud will be upgraded from version 16 to 17.
333+ warnings = let
334+ latest = 20;
335+ upgradeWarning = major: nixos:
336+ ''
337+ A legacy Nextcloud install (from before NixOS ${nixos}) may be installed.
346338
347− * If this is a fresh install, there will be no upgrade to do now.
339+ After nextcloud${toString major} is installed successfully, you can safely upgrade
340+ to ${toString (major + 1)}. The latest version available is nextcloud${toString latest}.
348341
349− * If this server already had Nextcloud installed, first deploy this to your
350− server, and wait until the upgrade to 17 is finished.
342+ Please note that Nextcloud doesn't support upgrades across multiple major versions
343+ (i.e. an upgrade from 16 is possible to 17, but not 16 to 18).
351344
352− Then, set `services.nextcloud.package` to `pkgs.nextcloud18` to upgrade to
353− Nextcloud version 18. Please note that Nextcloud 19 is already out and it's
354− recommended to upgrade to nextcloud19 after that.
345+ The package can be upgraded by explicitly declaring the service-option
346+ `services.nextcloud.package`.
347+ '';
348+ in (optional (cfg.poolConfig != null) ''
349+ Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
350+ Please migrate your configuration to config.services.nextcloud.poolSettings.
355351 '')
356− ++ (optional (versionOlder cfg.package.version "19") ''
357− A legacy Nextcloud install (from before NixOS 20.09) may be installed.
358−
359− If/After nextcloud18 is installed successfully, you can safely upgrade to
360− nextcloud19. If not, please upgrade to nextcloud18 first since Nextcloud doesn't
361− support upgrades that skip multiple versions (i.e. an upgrade from 17 to 19 isn't
362− possible, but an upgrade from 18 to 19).
363− '');
352+ ++ (optional (versionOlder cfg.package.version "18") (upgradeWarning 17 "20.03"))
353+ ++ (optional (versionOlder cfg.package.version "19") (upgradeWarning 18 "20.09"))
354+ ++ (optional (versionOlder cfg.package.version "20") (upgradeWarning 19 "21.03"));
364355
365356 services.nextcloud.package = with pkgs;
366357 mkDefault (
@@ -372,7 +363,8 @@ in {
372363 ''
373364 else if versionOlder stateVersion "20.03" then nextcloud17
374365 else if versionOlder stateVersion "20.09" then nextcloud18
375− else nextcloud19
366+ else if versionOlder stateVersion "21.03" then nextcloud19
367+ else nextcloud20
376368 );
377369 }
378370