summaryrefslogtreecommitdiff
path: root/trivionomicon/modules/mediawiki/options.nix
diff options
context:
space:
mode:
Diffstat (limited to 'trivionomicon/modules/mediawiki/options.nix')
-rw-r--r--trivionomicon/modules/mediawiki/options.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/trivionomicon/modules/mediawiki/options.nix b/trivionomicon/modules/mediawiki/options.nix
new file mode 100644
index 0000000..bb39a14
--- /dev/null
+++ b/trivionomicon/modules/mediawiki/options.nix
@@ -0,0 +1,62 @@
+{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 = "A file containing the initial password for the administrator account 'admin'";
+ example = "/run/keys/mediawiki-password";
+ };
+
+ skins = lib.mkOption {
+ type = types.attrsOf (types.nullOr str);
+ description = "skins for mediawiki";
+ default = {};
+ example = '' {
+ citizen = "flakes.mediawikiSkinCitizen";
+ };'';
+ };
+
+ extraConfig = lib.mkOption {
+ type = str;
+ default = "";
+ example = ''
+ # Disable anonymous editing and account creation
+ $wgGroupPermissions['*']['edit'] = false;
+ $wgGroupPermissions['*']['createaccount'] = false;
+ '';
+ };
+
+ extensions = lib.mkOption {
+ type = types.attrsOf (types.nullOr types.path);
+ description = "some extensions are included and can enabled by passing null";
+ default = {};
+ 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;
+ };'';
+ };
+ };
+}