2021-01-12 18:20:49 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2021-01-12 23:21:19 +00:00
|
|
|
let
|
|
|
|
unstable = import (import ../../../nix/sources.nix).nixpkgs-unstable {};
|
|
|
|
in {
|
2021-01-12 18:20:49 +00:00
|
|
|
containers.lantifa = {
|
|
|
|
autoStart = true;
|
|
|
|
privateNetwork = true;
|
|
|
|
hostAddress6 = "fd00::42:14";
|
|
|
|
localAddress6 = "fd00::42:15";
|
|
|
|
|
|
|
|
config = {config, pkgs, ... }: {
|
2021-01-13 17:18:16 +00:00
|
|
|
networking.hosts."fd00::42:14" = [ "wiki.lantifa.org" ];
|
2021-01-12 18:20:49 +00:00
|
|
|
networking.firewall.allowedTCPPorts = [ 4422 ];
|
|
|
|
users.users.mediawiki.extraGroups = [ "keys" ];
|
|
|
|
|
|
|
|
services.mediawiki = {
|
|
|
|
enable = true;
|
|
|
|
name = "LANtifa";
|
2021-01-12 23:21:19 +00:00
|
|
|
package = unstable.mediawiki;
|
2021-01-12 18:20:49 +00:00
|
|
|
database.createLocally = true;
|
|
|
|
passwordFile = "/var/lib/mediawiki/mediawiki-password";
|
2021-01-12 22:14:05 +00:00
|
|
|
extraConfig = ''require_once('/var/lib/mediawiki/plugins/WikiDB/WikiDB.php');
|
|
|
|
$wgExtraNamespaces = array( 100 => "Table", 101 => "Table_Talk",);
|
|
|
|
$wgWikiDBNamespaces = 100;
|
2021-01-13 17:18:16 +00:00
|
|
|
$wgGroupPermissions['user']['writeapi'] = true;
|
|
|
|
$wgDefaultUserOptions['visualeditor-enable'] = 1;
|
2021-01-12 22:14:05 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
extensions = {
|
2021-01-13 16:37:35 +00:00
|
|
|
TemplateData = null;
|
2021-01-13 17:18:16 +00:00
|
|
|
VisualEditor = null;
|
2021-01-13 16:37:35 +00:00
|
|
|
InputBox = null;
|
2021-01-12 22:14:05 +00:00
|
|
|
};
|
2021-01-12 18:20:49 +00:00
|
|
|
|
|
|
|
virtualHost = {
|
|
|
|
hostName = "wiki.lantifa.org";
|
|
|
|
listen = [ { port = 4422; } ];
|
|
|
|
adminAddr = "admin@hacc.space";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."wiki.lantifa.org" = {
|
|
|
|
locations."/".proxyPass = "http://[" + config.containers.lantifa.localAddress6 + "]:4422";
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
};
|
|
|
|
}
|