From a1e70f857403beffe21d758d031dc9c65c29911c Mon Sep 17 00:00:00 2001 From: Lyes Saadi Date: Mon, 26 May 2025 00:26:36 +0200 Subject: [PATCH] Ajout de quelques extensions --- modules/services/mediawiki.nix | 36 ++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/modules/services/mediawiki.nix b/modules/services/mediawiki.nix index 0353baa..3475c61 100644 --- a/modules/services/mediawiki.nix +++ b/modules/services/mediawiki.nix @@ -9,18 +9,7 @@ services.mediawiki = { enable = true; - httpd.virtualHost = { - hostName = "mediakiwi.crans.org"; - adminAddr = "root@crans.org"; - - listen = [ - { - ip = "127.0.0.1"; - port = 8080; - ssl = false; - } - ]; - }; + name = "Wiki Crans"; nginx.hostName = "mediakiwi.crans.org"; @@ -29,6 +18,10 @@ passwordFile = config.age.secrets.mediawiki-admin-passwd.path; extraConfig = '' + # Server Settings + $wgFavicon = 'https://www.crans.org/images/favicon.ico'; + $wgLogo = 'https://www.crans.org/images/crans.svg'; + # contact info $wgEmergencyContact = 'contact@crans.org'; @@ -39,6 +32,9 @@ # Disable anonymous editing $wgGroupPermissions['*']['edit'] = false; + + # Extensions + $wgWikiEditorRealtimePreview = true; ''; skins = { @@ -51,8 +47,22 @@ }; extensions = { - # activate visual editor + # Enables embedded extensions + Math = null; + MultimediaViewer = null; + SyntaxHighlight_GeSHi = null; VisualEditor = null; + WikiEditor = null; + + # Popups + TextExtracts = null; + PageImages = null; + Popups = pkgs.fetchFromGitHub { + owner = "wikimedia"; + repo = "mediawiki-extensions-Popups"; + tag = "REL1_38"; + sha256 = "sha256-iguedL3pih3XnnAMt/kV+PVCu7MRCuKXXI8zGu9tjZw="; + }; }; }; }