Compare commits
No commits in common. "b4974a7fc6338ad127bfe667084010199b2961f6" and "974154ce2da0b60bdff5ae3c57e0490db58d9f0e" have entirely different histories.
b4974a7fc6
...
974154ce2d
3 changed files with 0 additions and 116 deletions
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
doctrine,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
doctrine.lib.mkModule {
|
|
||||||
inherit config;
|
|
||||||
name = "mediawiki";
|
|
||||||
sys = ./sys.nix;
|
|
||||||
options = ./options.nix;
|
|
||||||
}
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
{lib, ...}:
|
|
||||||
with lib.types; {
|
|
||||||
sys = {
|
|
||||||
hostName = lib.mkOption {
|
|
||||||
type = str;
|
|
||||||
description = "used for nginx virtualhost. no protocol";
|
|
||||||
example = "wiki.posixlycorrect.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
name = lib.mkOption {
|
|
||||||
type = str;
|
|
||||||
description = "name of the wiki";
|
|
||||||
example = "posixlycorrect wiki";
|
|
||||||
};
|
|
||||||
|
|
||||||
passwordFile = lib.mkOption {
|
|
||||||
type = types.path;
|
|
||||||
description = "path of passwordfile for mediawiki";
|
|
||||||
example = "/run/keys/mediawiki-password";
|
|
||||||
};
|
|
||||||
|
|
||||||
skins = lib.mkOption {
|
|
||||||
type = types.attrsOf (types.nullOr str);
|
|
||||||
description = "skins for mediawiki";
|
|
||||||
example = ''{
|
|
||||||
citizen = "flakes.mediawikiSkinCitizen";
|
|
||||||
};'';
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = lib.mkOption {
|
|
||||||
type = str;
|
|
||||||
example = ''
|
|
||||||
# Disable anonymous editing and account creation
|
|
||||||
$wgGroupPermissions['*']['edit'] = false;
|
|
||||||
$wgGroupPermissions['*']['createaccount'] = false;
|
|
||||||
|
|
||||||
$wgCitizenThemeDefault = 'dark';
|
|
||||||
$wgCitizenShowPageTools = 'login';
|
|
||||||
$wgLogos = [
|
|
||||||
'icon' => "https://example.com/favicon.png",
|
|
||||||
'1x' => "https://example.com/favicon.png",
|
|
||||||
'2x' => "https://example.com/favicon.png",
|
|
||||||
];
|
|
||||||
|
|
||||||
$wgEnableEmail = false; #TODO: arreglar esto
|
|
||||||
$wgNoReplyAddress = 'mediawiki@example.com';
|
|
||||||
$wgEmergencyContact = 'mediawiki@example.com';
|
|
||||||
$wgPasswordSender = 'mediawiki@example.com';
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
extensions = lib.mkOption {
|
|
||||||
type = types.attrsOf (types.nullOr types.path);
|
|
||||||
description = "some extensions are included and can enabled by passing null";
|
|
||||||
example = ''{
|
|
||||||
VisualEditor = null;
|
|
||||||
CategoryTree = null;
|
|
||||||
CiteThisPage = null;
|
|
||||||
Scribunto = null;
|
|
||||||
Cite = null;
|
|
||||||
CodeEditor = null;
|
|
||||||
Math = null;
|
|
||||||
MultimediaViewer = null;
|
|
||||||
PdfHandler = null;
|
|
||||||
Poem = null;
|
|
||||||
SecureLinkFixer = null;
|
|
||||||
WikiEditor = null;
|
|
||||||
ParserFunctions = null;
|
|
||||||
};'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
cfg,
|
|
||||||
doctrine,
|
|
||||||
...
|
|
||||||
}: with lib; {
|
|
||||||
services = {
|
|
||||||
nginx = {
|
|
||||||
virtualHosts.${cfg.hostName} = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_headers_hash_max_size 512;
|
|
||||||
proxy_headers_hash_bucket_size 128;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mediawiki = {
|
|
||||||
enable = true;
|
|
||||||
name = cfg.name;
|
|
||||||
webserver = "nginx";
|
|
||||||
nginx.hostName = cfg.hostName;
|
|
||||||
database.type = "postgres";
|
|
||||||
passwordFile = cfg.passwordFile;
|
|
||||||
skins = cfg.skins;
|
|
||||||
extraConfig = cfg.extraConfig;
|
|
||||||
extensions = cfg.extensions;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue