diff options
| author | Alejandro Soto <alejandro@34project.org> | 2026-02-03 15:16:48 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2026-02-03 15:16:48 -0600 |
| commit | 57e33b923de6a9122e43613778de0d268a5b4eb8 (patch) | |
| tree | 806101359fe89031b29a4eb37f10ba96b511c3f9 /trivionomicon/modules/mediawiki/options.nix | |
| parent | f2a85354abbad60ea13f15d7c20a988d2f9a6a52 (diff) | |
| parent | 4a822c48da5a3aa4550fd0fad2697fd023c1810a (diff) | |
Merge commit 'b4974a7fc6338ad127bfe667084010199b2961f6' into master
Diffstat (limited to 'trivionomicon/modules/mediawiki/options.nix')
| -rw-r--r-- | trivionomicon/modules/mediawiki/options.nix | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/trivionomicon/modules/mediawiki/options.nix b/trivionomicon/modules/mediawiki/options.nix new file mode 100644 index 0000000..06acbf1 --- /dev/null +++ b/trivionomicon/modules/mediawiki/options.nix @@ -0,0 +1,72 @@ +{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; + };''; + }; + }; +} |
