git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #94609 from 1000101/dokuwiki

nixos/dokuwiki: drop SSL forcing and document incompatibility

commit0bc37f7cb40dfde509000b22a9e8f5c231d5250e authorMarek Mahut <marek.mahut@gmail.com> dateWed 5 Aug 2020, 11:54 (6 years ago) parent6cf131d15b6edc
3 files changed+32−18
nixos/doc/manual/release-notes/rl-2009.xml+25 nixos/modules/services/web-apps/dokuwiki.nix+7−10 nixos/tests/dokuwiki.nix−8
nixos/doc/manual/release-notes/rl-2009.xml+25
@@ -593,6 +593,31 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
593593 When updating Graylog from a version before 3.3.3 make sure to check the Graylog <link xlink:href="https://www.graylog.org/post/announcing-graylog-v3-3-3">release info</link> for information on how to avoid the issue.
594594 </para>
595595 </listitem>
596+ <listitem>
597+ <para>
598+ The <literal>dokuwiki</literal> module has changed to multi-instance, using submodules.
599+ Therefore, it is now mandatory to name each instance. Moreover, forcing SSL by default has been dropped, so
600+ <literal>nginx.forceSSL</literal> and <literal>nginx.enableACME</literal> are no longer set to <literal>true</literal>.
601+ To continue using your service with the original SSL settings, you have to adjust the original config, e.g.:
602+<programlisting>
603+services.dokuwiki = {
604+ enable = true;
605+ ...
606+};
607+</programlisting>
608+ To something similar:
609+<programlisting>
610+services.dokuwiki."mywiki" = {
611+ enable = true;
612+ nginx = {
613+ forceSSL = true;
614+ enableACME = true;
615+ };
616+ ...
617+};
618+</programlisting>
619+ </para>
620+ </listitem>
596621 </itemizedlist>
597622 </section>
598623
nixos/modules/services/web-apps/dokuwiki.nix+7−10
@@ -249,22 +249,19 @@ let
249249 nginx = mkOption {
250250 type = types.submodule (
251251 recursiveUpdate
252− (import ../web-servers/nginx/vhost-options.nix { inherit config lib; })
253− {
254− # Enable encryption by default,
255− options.forceSSL.default = true;
256− options.enableACME.default = true;
257− }
252+ (import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) {}
258253 );
259− default = {forceSSL = true; enableACME = true;};
254+ default = {};
260255 example = {
261256 serverAliases = [
262257 "wiki.\${config.networking.domain}"
263258 ];
264− enableACME = false;
259+ # To enable encryption and let let's encrypt take care of certificate
260+ forceSSL = true;
261+ enableACME = true;
265262 };
266263 description = ''
267− With this option, you can customize the nginx virtualHost which already has sensible defaults for DokuWiki.
264+ With this option, you can customize the nginx virtualHost settings.
268265 '';
269266 };
270267 };
@@ -276,7 +273,7 @@ in
276273 services.dokuwiki = mkOption {
277274 type = types.attrsOf (types.submodule siteOpts);
278275 default = {};
279− description = "Sepcification of one or more dokuwiki sites to service.";
276+ description = "Sepcification of one or more dokuwiki sites to serve.";
280277 };
281278 };
282279
nixos/tests/dokuwiki.nix−8
@@ -39,18 +39,10 @@ in {
3939 services.dokuwiki."site1.local" = {
4040 aclUse = false;
4141 superUser = "admin";
42− nginx = {
43− forceSSL = false;
44− enableACME = false;
45− };
4642 };
4743 services.dokuwiki."site2.local" = {
4844 aclUse = true;
4945 superUser = "admin";
50− nginx = {
51− forceSSL = false;
52− enableACME = false;
53− };
5446 templates = [ template-bootstrap3 ];
5547 plugins = [ plugin-icalevents ];
5648 };