hainich/lantifa: fix visualeditor

This commit is contained in:
hexchen 2021-01-13 18:48:06 +00:00
parent 410d9fa13d
commit 2ccb2d3ded

View file

@ -10,8 +10,8 @@ in {
localAddress6 = "fd00::42:15"; localAddress6 = "fd00::42:15";
config = {config, pkgs, ... }: { config = {config, pkgs, ... }: {
networking.hosts."fd00::42:14" = [ "wiki.lantifa.org" ]; networking.hosts."::1" = [ "wiki.lantifa.org" ];
networking.firewall.allowedTCPPorts = [ 4422 ]; networking.firewall.allowedTCPPorts = [ 80 ];
users.users.mediawiki.extraGroups = [ "keys" ]; users.users.mediawiki.extraGroups = [ "keys" ];
services.mediawiki = { services.mediawiki = {
@ -20,7 +20,13 @@ in {
package = unstable.mediawiki; package = unstable.mediawiki;
database.createLocally = true; database.createLocally = true;
passwordFile = "/var/lib/mediawiki/mediawiki-password"; 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",); $wgExtraNamespaces = array( 100 => "Table", 101 => "Table_Talk",);
$wgWikiDBNamespaces = 100; $wgWikiDBNamespaces = 100;
$wgGroupPermissions['user']['writeapi'] = true; $wgGroupPermissions['user']['writeapi'] = true;
@ -35,7 +41,7 @@ in {
virtualHost = { virtualHost = {
hostName = "wiki.lantifa.org"; hostName = "wiki.lantifa.org";
listen = [ { port = 4422; } ]; listen = [ { port = 80; } ];
adminAddr = "admin@hacc.space"; adminAddr = "admin@hacc.space";
}; };
}; };
@ -43,7 +49,7 @@ in {
}; };
services.nginx.virtualHosts."wiki.lantifa.org" = { services.nginx.virtualHosts."wiki.lantifa.org" = {
locations."/".proxyPass = "http://[" + config.containers.lantifa.localAddress6 + "]:4422"; locations."/".proxyPass = "http://[" + config.containers.lantifa.localAddress6 + "]";
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
}; };