41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ lib, pkgs, ... }:
|
|
with lib;
|
|
{
|
|
services = {
|
|
nginx = {
|
|
virtualHosts."wiki.posixlycorrect.com" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
extraConfig = ''
|
|
proxy_headers_hash_max_size 512;
|
|
proxy_headers_hash_bucket_size 128;
|
|
'';
|
|
};
|
|
};
|
|
mediawiki = {
|
|
enable = true;
|
|
name = "posixlycorrect wiki";
|
|
webserver = "nginx";
|
|
nginx.hostName = "wiki.posixlycorrect.com";
|
|
database.type = "postgres";
|
|
|
|
passwordFile = "/run/keys/mediawiki-password";
|
|
extraConfig = ''
|
|
# Disable anonymous editing and account creation
|
|
$wgGroupPermissions['*']['edit'] = false;
|
|
$wgGroupPermissions['*']['createaccount'] = false;
|
|
|
|
$wgEnableEmail = false; #TODO: arreglar esto
|
|
$wgNoReplyAddress = 'mediawiki@posixlycorrect.com';
|
|
$wgEmergencyContact = 'mediawiki@posixlycorrect.com';
|
|
$wgPasswordSender = 'mediawiki@posixlycorrect.com';
|
|
'';
|
|
|
|
extensions = {
|
|
# some extensions are included and can enabled by passing null
|
|
VisualEditor = null;
|
|
};
|
|
};
|
|
};
|
|
}
|