summaryrefslogtreecommitdiff
path: root/modules/mediawiki
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mediawiki')
-rw-r--r--modules/mediawiki/default.nix13
-rw-r--r--modules/mediawiki/options.nix62
-rw-r--r--modules/mediawiki/sys.nix32
3 files changed, 0 insertions, 107 deletions
diff --git a/modules/mediawiki/default.nix b/modules/mediawiki/default.nix
deleted file mode 100644
index 2ed69c2..0000000
--- a/modules/mediawiki/default.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- config,
- lib,
- pkgs,
- doctrine,
- ...
-}:
-doctrine.lib.mkModule {
- inherit config;
- name = "mediawiki";
- sys = ./sys.nix;
- options = ./options.nix;
-}
diff --git a/modules/mediawiki/options.nix b/modules/mediawiki/options.nix
deleted file mode 100644
index bb39a14..0000000
--- a/modules/mediawiki/options.nix
+++ /dev/null
@@ -1,62 +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 = "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;
- };'';
- };
- };
-}
diff --git a/modules/mediawiki/sys.nix b/modules/mediawiki/sys.nix
deleted file mode 100644
index b6a9273..0000000
--- a/modules/mediawiki/sys.nix
+++ /dev/null
@@ -1,32 +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;
- };
- };
-}