From 868764e0cd2a94a884156d801595f527283e4c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Tveit?= Date: Wed, 10 Jul 2024 19:04:55 +0200 Subject: [PATCH] bekkalokk/mediawiki: misc configuration --- .../bekkalokk/services/mediawiki/default.nix | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/hosts/bekkalokk/services/mediawiki/default.nix b/hosts/bekkalokk/services/mediawiki/default.nix index ca8a333..941f9f6 100644 --- a/hosts/bekkalokk/services/mediawiki/default.nix +++ b/hosts/bekkalokk/services/mediawiki/default.nix @@ -135,10 +135,25 @@ in { $wgEmergencyContact = "${cfg.passwordSender}"; $wgUseTeX = false; $wgLocalInterwiki = $wgSitename; + # Fix https://github.com/NixOS/nixpkgs/issues/183097 + $wgDBserver = "${toString cfg.database.host}"; + $wgAllowCopyUploads = true; - # SimpleSAML + # Misc program paths + $wgFFmpegLocation = '${pkgs.ffmpeg}/bin/ffmpeg'; + $wgExiftool = '${pkgs.exiftool}/bin/exiftool'; + $wgExiv2Command = '${pkgs.exiv2}/bin/exiv2'; + # See https://gist.github.com/sergejmueller/088dce028b6dd120a16e + $wgJpegTran = '${pkgs.mozjpeg}/bin/jpegtran'; + $wgGitBin = '${pkgs.git}/bin/git'; + + # Debugging + $wgShowExceptionDetails = false; + $wgShowIPinHeader = false; + + # EXT:{SimpleSAML,PluggableAuth} $wgSimpleSAMLphp_InstallDir = "${simplesamlphp}/share/php/simplesamlphp/"; - $wgPluggableAuth_Config['Log in using my SAML'] = [ + $wgPluggableAuth_Config['Log in using SAML'] = [ 'plugin' => 'SimpleSAMLphp', 'data' => [ 'authSourceId' => 'default-sp', @@ -148,12 +163,12 @@ in { ] ]; - # Debugging - $wgShowExceptionDetails = false; - $wgShowIPinHeader = false; + # EXT:Scribunto + $wgScribuntoDefaultEngine = 'luastandalone'; + $wgScribuntoEngineConf['luastandalone']['luaPath'] = '${pkgs.lua}/bin'; - # Fix https://github.com/NixOS/nixpkgs/issues/183097 - $wgDBserver = "${toString cfg.database.host}"; + # EXT:WikiEditor + $wgWikiEditorRealtimePreview = true; ''; };