MediaWiki: Difference between revisions
imported>Onny mNo edit summary |
imported>Mweinelt |
||
Line 26: | Line 26: | ||
extensions = { | extensions = { | ||
VisualEditor = pkgs.fetchzip { | # some extensions are included and can enabled by passing null | ||
url = "https://extdist.wmflabs.org/dist/extensions/ | VisualEditor = null; | ||
# https://www.mediawiki.org/wiki/Extension:TemplateStyles | |||
TemplateStyles = pkgs.fetchzip { | |||
url = "https://extdist.wmflabs.org/dist/extensions/TemplateStyles-REL1_40-c639c7a.tar.gz"; | |||
hash = "sha256-YBL0Cs4hDSNnoutNJSJBdLsv9zFWVkzo7m5osph8QiY="; | |||
}; | }; | ||
}; | }; |
Revision as of 15:37, 31 July 2023
MediaWiki (wikipedia:en:MediaWiki) is available as a module.
configuration examples
small configuration
services.mediawiki = {
enable = true;
name = "Sample MediaWiki instance";
virtualHost = {
hostName = "example.com";
adminAddr = "admin@example.com";
};
passwordFile = "/var/mediawiki/passwordFile"; # put the initial password for the admin account here
extraConfig = ''
# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;
'';
extensions = {
# some extensions are included and can enabled by passing null
VisualEditor = null;
# https://www.mediawiki.org/wiki/Extension:TemplateStyles
TemplateStyles = pkgs.fetchzip {
url = "https://extdist.wmflabs.org/dist/extensions/TemplateStyles-REL1_40-c639c7a.tar.gz";
hash = "sha256-YBL0Cs4hDSNnoutNJSJBdLsv9zFWVkzo7m5osph8QiY=";
};
};
};
web server
By default, the services.mediawiki
module creates a services.httpd.virtualHost
which can be configured via the services.mediawiki.virtualHost
submodule.
If you are using another web server (like Nginx), you can configure MediaWiki for a reverse proxy with the services.mediawiki.virtualHost.listen
option:
services.mediawiki.virtualHost.listen = [
{
ip = "127.0.0.1";
port = 8080;
ssl = false;
}
];