MediaWiki: Difference between revisions

From NixOS Wiki
imported>Vater
m (Vater moved page Mediawiki to MediaWiki)
imported>Vater
(mediawiki is available as a package and with a lot of options)
Line 1: Line 1:
[https://www.mediawiki.org/wiki/MediaWiki Mediawiki] is available in NixOS.
[https://www.mediawiki.org/wiki/MediaWiki MediaWiki] is available in [[NixOS]].


https://search.nixos.org/packages?query=mediawiki
https://search.nixos.org/options?query=mediawiki
<s>
== Overview ==
== Overview ==


Line 36: Line 41:
# 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.
# 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.
# It is ideal if we can have a working, secure, default installation without having to fall-back to extraConfig.  We're not there yet.
# It is ideal if we can have a working, secure, default installation without having to fall-back to extraConfig.  We're not there yet.
 
</s>
=== Halp?! ===
 
__red__ on freenode.
 
 


[[Category:Guide]]
[[Category:Guide]]

Revision as of 04:55, 5 September 2021

MediaWiki is available in NixOS.

https://search.nixos.org/packages?query=mediawiki

https://search.nixos.org/options?query=mediawiki

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.