Skip to content

Mediawiki

services.mediawiki.database.createLocally

Create the database and database user locally. This currently only applies if database type "mysql" is selected.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.database.host

Database host address. Type: string

Default

"localhost"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.database.name

Database name. Type: string

Default

"mediawiki"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.database.passwordFile

A file containing the password corresponding to {option}database.user.

Type: null or path

Default

null

Example

"/run/keys/mediawiki-dbpassword"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.database.port

Database host port. Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

3306

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.database.socket

Path to the unix socket file to use for authentication. Type: null or path

Default

/run/mysqld/mysqld.sock

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.database.tablePrefix

If you only have access to a single database and wish to install more than one version of MediaWiki, or have other applications that also use the database, you can give the table names a unique prefix to stop any naming conflicts or confusion. See https://www.mediawiki.org/wiki/Manual:$wgDBprefix.

Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.database.type

Database engine to use. MySQL/MariaDB is the database of choice by MediaWiki developers. Type: one of "mysql", "postgres", "mssql", "oracle"

Default

"mysql"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.database.user

Database user. Type: string

Default

"mediawiki"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.enable

Whether to enable MediaWiki. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.extensions

Attribute set of paths whose content is copied to the {file}extensions subdirectory of the MediaWiki installation and enabled in configuration.

Use null instead of path to enable extensions that are part of MediaWiki.

Type: attribute set of (null or path)

Default

{ }

Example

{Matomo = pkgs.fetchzip {url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";sha256 = "0g5rd3zp0avwlmqagc59cg9bbkn3r7wx7p6yr80s644mj6dlvs1b";};ParserFunctions = null;}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.extraConfig

Any additional text to be appended to MediaWiki's LocalSettings.php configuration file. For configuration settings, see https://www.mediawiki.org/wiki/Manual:Configuration_settings.

Type: strings concatenated with "\n"

Default

""

Example

'' $wgEnableEmail = false;''

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.finalPackage

The final package used by the module. This is the package that will have extensions and skins installed.

Type: package

Default

pkg

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost

Apache configuration can be done by adapting {option}services.httpd.virtualHosts. See for further information.

Type: submodule

Example

{hostName = "mediawiki.example.org";adminAddr = "webmaster@example.org";forceSSL = true;enableACME = true;}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.acmeRoot

Directory for the acme challenge which is PUBLIC, don't put certs or keys in here. Set to null to inherit from config.security.acme.

Type: null or string

Default

"/var/lib/acme/acme-challenge"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.addSSL

Whether to enable HTTPS in addition to plain HTTP. This will set defaults for listen to listen on all interfaces on the respective default ports (80, 443).

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.adminAddr

E-mail address of the server administrator. Type: null or string

Default

null

Example

"admin@example.org"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.documentRoot

The path of Apache's document root directory. If left undefined, an empty directory in the Nix store will be used as root.

Type: null or path

Default

null

Example

"/data/webserver/docs"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.enableACME

Whether to ask Let's Encrypt to sign a certificate for this vhost. Alternately, you can use an existing certificate through {option}useACMEHost.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.enableUserDir

Whether to enable serving {file}~/public_html as /~«username».

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.extraConfig

These lines go to httpd.conf verbatim. They will go after directories and directory aliases defined by default.

Type: strings concatenated with "\n"

Default

""

Example

'' <Directory /home> Options FollowSymlinks AllowOverride All </Directory>''

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.forceSSL

Whether to add a separate nginx server block that permanently redirects (301) all plain HTTP traffic to HTTPS. This will set defaults for listen to listen on all interfaces on the respective default ports (80, 443), where the non-SSL listens are used for the redirect vhosts.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.globalRedirect

If set, all requests for this host are redirected permanently to the given URL.

Type: null or string

Default

null

Example

"http://newserver.example.org/"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.hostName

Canonical hostname for the server. Type: string

Default

"‹name›"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.http2

Whether to enable HTTP 2. HTTP/2 is supported in all multi-processing modules that come with httpd. However, if you use the prefork mpm, there will be severe restrictions. Refer to https://httpd.apache.org/docs/2.4/howto/http2.html#mpm-config for details.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.listen

Listen addresses and ports for this virtual host.

::: {.note} This option overrides addSSL, forceSSL and onlySSL.

If you only want to set the addresses manually and not the ports, take a look at listenAddresses. :::

Type: list of (submodule)

Default

[ ]

Example

[{ip = "195.154.1.1";port = 443;ssl = true;}{ip = "192.154.1.1";port = 80;}{ip = "*";port = 8080;}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.listen.*.ip

IP to listen on. 0.0.0.0 for IPv4 only, * for all. Type: string

Default

"*"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.listen.*.port

Port to listen on Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.listen.*.ssl

Whether to enable SSL (https) support. Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.listenAddresses

Listen addresses for this virtual host. Compared to listen this only sets the addresses and the ports are chosen automatically.

Type: non-empty (list of string)

Default

["*"]

Example

["127.0.0.1"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.locations

Declarative location config. See https://httpd.apache.org/docs/2.4/mod/core.html#location for details.

Type: attribute set of (submodule)

Default

{ }

Example

{"/" = {proxyPass = "http://localhost:3000";};"/foo/bar.png" = {alias = "/home/eelco/some-file.png";};};

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.locations.<name>.alias

Alias directory for requests. See https://httpd.apache.org/docs/2.4/mod/mod_alias.html#alias.

Type: null or path

Default

null

Example

"/your/alias/directory"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.locations.<name>.extraConfig

These lines go to the end of the location verbatim.

Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.locations.<name>.index

Adds DirectoryIndex directive. See https://httpd.apache.org/docs/2.4/mod/mod_dir.html#directoryindex.

Type: null or string

Default

null

Example

"index.php index.html"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.locations.<name>.priority

Order of this location block in relation to the others in the vhost. The semantics are the same as with lib.mkOrder. Smaller values have a greater priority.

Type: signed integer

Default

1000

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.locations.<name>.proxyPass

Sets up a simple reverse proxy as described by https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html#simple.

Type: null or string

Default

null

Example

"http://www.example.org/"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.logFormat

Log format for Apache's log files. Possible values are: combined, common, referer, agent.

Type: string

Default

"common"

Example

"combined"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.onlySSL

Whether to enable HTTPS and reject plain HTTP connections. This will set defaults for listen to listen on all interfaces on port 443.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.robotsEntries

Specification of pages to be ignored by web crawlers. See http://www.robotstxt.org/ for details.

Type: strings concatenated with "\n"

Default

""

Example

"Disallow: /foo/"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.servedDirs

This option provides a simple way to serve static directories.

Type: list of (attribute set)

Default

[ ]

Example

[{dir = "/home/eelco/Dev/nix-homepage";urlPath = "/nix";}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.servedFiles

This option provides a simple way to serve individual, static files.

::: {.note} This option has been deprecated and will be removed in a future version of NixOS. You can achieve the same result by making use of the locations.<name>.alias option. :::

Type: list of (attribute set)

Default

[ ]

Example

[{file = "/home/eelco/some-file.png";urlPath = "/foo/bar.png";}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.serverAliases

Additional names of virtual hosts served by this virtual host configuration.

Type: list of string

Default

[ ]

Example

["www.example.org""www.example.org:8080""example.org"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.sslServerCert

Path to server SSL certificate. Type: path

Example

"/var/host.cert"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.sslServerChain

Path to server SSL chain file. Type: null or path

Default

null

Example

"/var/ca.pem"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.sslServerKey

Path to server SSL certificate key. Type: path

Example

"/var/host.key"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.httpd.virtualHost.useACMEHost

A host of an existing Let's Encrypt certificate to use. This is useful if you have many subdomains and want to avoid hitting the rate limit. Alternately, you can generate a certificate through {option}enableACME. Note that this option does not create any certificates, nor it does add subdomains to existing ones – you will need to create them manually using .

Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.name

Name of the wiki. Type: string

Default

"MediaWiki"

Example

"Foobar Wiki"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.nginx.hostName

The hostname to use for the nginx virtual host. This is used to generate the nginx configuration.

Type: string

Default

"localhost"

Example

wiki.example.com

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.package

The mediawiki package to use. Type: package

Default

pkgs.mediawiki

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.passwordFile

A file containing the initial password for the administrator account "admin".

Type: path

Example

"/run/keys/mediawiki-password"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.passwordSender

Contact address for password reset. Type: string

Default

if cfg.webserver == "apache" thenif cfg.httpd.virtualHost.adminAddr != null thencfg.httpd.virtualHost.adminAddrelseconfig.services.httpd.adminAddr else "root@localhost"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.poolConfig

Options for the MediaWiki PHP pool. See the documentation on php-fpm.conf for details on configuration directives.

Type: attribute set of (string or signed integer or boolean)

Default

{pm = "dynamic";"pm.max_children" = 32;"pm.max_requests" = 500;"pm.max_spare_servers" = 4;"pm.min_spare_servers" = 2;"pm.start_servers" = 2;}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.skins

Attribute set of paths whose content is copied to the {file}skins subdirectory of the MediaWiki installation in addition to the default skins.

Type: attribute set of path

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.uploadsDir

This directory is used for uploads of pictures. The directory passed here is automatically created and permissions adjusted as required.

Type: null or path

Default

"/var/lib/mediawiki/uploads"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.url

URL of the wiki. Type: string

Default

'' if "mediawiki uses ssl" then "{"https" else "http"}://''${cfg.hostName}" else "http://localhost";''

Example

"https://wiki.example.org"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix

services.mediawiki.webserver

Webserver to use. Type: one of "apache", "none", "nginx"

Default

"apache"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/mediawiki.nix