trivionomicon/modules/mediawiki/options.nix

62 lines
1.6 KiB
Nix

{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";
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;
};'';
};
};
}