forked from hacc/haccfiles
hainich/lantifa: fix visualeditor
This commit is contained in:
parent
410d9fa13d
commit
2ccb2d3ded
1 changed files with 16 additions and 10 deletions
|
@ -10,8 +10,8 @@ in {
|
|||
localAddress6 = "fd00::42:15";
|
||||
|
||||
config = {config, pkgs, ... }: {
|
||||
networking.hosts."fd00::42:14" = [ "wiki.lantifa.org" ];
|
||||
networking.firewall.allowedTCPPorts = [ 4422 ];
|
||||
networking.hosts."::1" = [ "wiki.lantifa.org" ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
users.users.mediawiki.extraGroups = [ "keys" ];
|
||||
|
||||
services.mediawiki = {
|
||||
|
@ -20,14 +20,20 @@ in {
|
|||
package = unstable.mediawiki;
|
||||
database.createLocally = true;
|
||||
passwordFile = "/var/lib/mediawiki/mediawiki-password";
|
||||
extraConfig = ''require_once('/var/lib/mediawiki/plugins/WikiDB/WikiDB.php');
|
||||
extraConfig = let
|
||||
wikidb = pkgs.fetchzip {
|
||||
url = "http://www.kennel17.co.uk/uploads/testwiki/e/e9/WikiDB.zip";
|
||||
sha256 = "0d4f2ygglz4w515a7lgw59500q3xmr92xxhsmh8p204yaa769x8v";
|
||||
};
|
||||
in ''
|
||||
require_once('${wikidb}/WikiDB.php');
|
||||
$wgExtraNamespaces = array( 100 => "Table", 101 => "Table_Talk",);
|
||||
$wgWikiDBNamespaces = 100;
|
||||
$wgGroupPermissions['user']['writeapi'] = true;
|
||||
$wgDefaultUserOptions['visualeditor-enable'] = 1;
|
||||
'';
|
||||
'';
|
||||
|
||||
extensions = {
|
||||
extensions = {
|
||||
TemplateData = null;
|
||||
VisualEditor = null;
|
||||
InputBox = null;
|
||||
|
@ -35,7 +41,7 @@ in {
|
|||
|
||||
virtualHost = {
|
||||
hostName = "wiki.lantifa.org";
|
||||
listen = [ { port = 4422; } ];
|
||||
listen = [ { port = 80; } ];
|
||||
adminAddr = "admin@hacc.space";
|
||||
};
|
||||
};
|
||||
|
@ -43,8 +49,8 @@ in {
|
|||
};
|
||||
|
||||
services.nginx.virtualHosts."wiki.lantifa.org" = {
|
||||
locations."/".proxyPass = "http://[" + config.containers.lantifa.localAddress6 + "]:4422";
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
locations."/".proxyPass = "http://[" + config.containers.lantifa.localAddress6 + "]";
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue