MediaWiki: Difference between revisions

From NixOS Wiki
imported>Redvers
Initial mediawiki guide.
 
imported>Vater
m Vater moved page Mediawiki to MediaWiki
(No difference)

Revision as of 04:44, 5 September 2021

Mediawiki is available in NixOS.

Overview

At the time of writing the mediawiki expression exists as an apache subservice. In the future this the build part of the expression will need to move to its own package. This will require a change in the future and we will endeavor to have a deprecation message inform you of the syntax changes required to migrate when the time comes.

installation

There are a few things you need to configure in order to use the existing tooling. Install your database of choice and create the database user and password as required.

For the simplest default configuration, in configuration.nix, add:

{
  ...
   services.httpd.extraSubservices =
    [ { serviceType = "mediawiki";
        siteName = "your.sitename.here";
        id = "unique_identifier";
        dbName = "dbname";
        dbUser = "dbusername";
        dbPassword = "redacted";
        defaultSkin = "MonoBook";
        extraConfig = ''
          wfLoadSkin( 'MonoBook' );
          wfLoadExtension( 'WikiEditor' );
          $wgDefaultUserOptions['usebetatoolbar'] = 1;
        '';
      }
    ];
  ...
}


Known Issues

There are several known issues with the package which will be remediated when we re-factor it out of a subService. To name a few:

  1. The database creation scripts run as 'root' for postgresql and fail. To fix this you can temporarily grant root dba access, run your first installation and revoke.
  2. It is ideal if we can have a working, secure, default installation without having to fall-back to extraConfig. We're not there yet.

Halp?!

__red__ on freenode.