mediawiki: format
This commit is contained in:
parent
587a56b313
commit
3400216379
|
@ -27,6 +27,46 @@ in
|
|||
|
||||
mediawiki = {
|
||||
enable = true;
|
||||
database = {
|
||||
type = "postgres";
|
||||
socket = "/run/postgresql";
|
||||
};
|
||||
|
||||
# see https://extdist.wmflabs.org/dist/extensions/ for list of extensions
|
||||
# save them on https://web.archive.org/save and copy the final URL below
|
||||
extensions = {
|
||||
Lockdown = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710141042/https://extdist.wmflabs.org/dist/extensions/Lockdown-REL1_40-7d900ed.tar.gz";
|
||||
sha256 = "sha256-TgoL9IcwY4EBNUsoVBqpUehVO7TEDT22FoH7Ep4dMxw=";
|
||||
};
|
||||
# TODO: replace with https://www.mediawiki.org/wiki/Extension:DynamicPageList3
|
||||
intersection = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710142223/https://extdist.wmflabs.org/dist/extensions/intersection-REL1_40-f3c1559.tar.gz";
|
||||
sha256 = "sha256-/Ap56EOfsAlx/gkN8Y+NdU28yuZsZmrrBMmuNoi88/A=";
|
||||
};
|
||||
# requires PluggableAuth
|
||||
LDAPAuthentication2 =
|
||||
let
|
||||
src = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710142325/https://extdist.wmflabs.org/dist/extensions/LDAPAuthentication2-REL1_40-2864ae9.tar.gz";
|
||||
sha256 = "sha256-LWXpmgzUpgEaPe/4cwF2cmJxPkW8ywT7gRAlB58mDfY=";
|
||||
};
|
||||
in
|
||||
# TODO: remove with next release
|
||||
pkgs.runCommand "LDAPAuthentication2" { } ''
|
||||
mkdir $out
|
||||
cp -r ${src}/* $out
|
||||
sed 's/"PluggableAuth": "6.*"/"PluggableAuth": "*"/g' -i $out/extension.json
|
||||
'';
|
||||
LDAPProvider = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710141035/https://extdist.wmflabs.org/dist/extensions/LDAPProvider-REL1_40-99edc23.tar.gz";
|
||||
sha256 = "sha256-DYq5CCm//rc6Mei9K6S2Ue+hzz6PYHnwpbJouFS5j+o=";
|
||||
};
|
||||
PluggableAuth = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710142618/https://extdist.wmflabs.org/dist/extensions/PluggableAuth-REL1_40-519c6d2.tar.gz";
|
||||
sha256 = "sha256-N1+OV1UdzvU4iXhaS/+fuEoAXqrkVyyEPDirk0vrT8A=";
|
||||
};
|
||||
};
|
||||
httpd.virtualHost = {
|
||||
adminAddr = "no-reply@c3d2.de";
|
||||
enableACME = true;
|
||||
|
@ -41,11 +81,16 @@ in
|
|||
RewriteRule ^(.*) /index.php/$1 [L,QSA]
|
||||
'';
|
||||
};
|
||||
|
||||
#skins = {
|
||||
# Vector = "${config.services.mediawiki.package}/share/mediawiki/skins/Vector";
|
||||
# Hector = "${config.services.mediawiki.package}/share/mediawiki/skins/Hector";
|
||||
# Vector = "${config.services.mediawiki.package}/share/mediawiki/skins/Vector";
|
||||
# Hector = "${config.services.mediawiki.package}/share/mediawiki/skins/Hector";
|
||||
#};
|
||||
|
||||
name = "C3D2";
|
||||
# initial admin user password
|
||||
passwordFile = config.sops.secrets."mediawiki/adminPassword".path;
|
||||
uploadsDir = "/var/lib/mediawiki/uploads";
|
||||
|
||||
extraConfig = /* php */ ''
|
||||
$wgArticlePath = '/$1';
|
||||
|
@ -144,48 +189,6 @@ in
|
|||
$LDAPProviderDomainConfigs = "${config.sops.secrets."mediawiki/ldapprovider".path}";
|
||||
$wgPluggableAuth_EnableLocalLogin = true;
|
||||
'';
|
||||
# see https://extdist.wmflabs.org/dist/extensions/ for list of extensions
|
||||
# save them on https://web.archive.org/save and copy the final URL below
|
||||
extensions = {
|
||||
Lockdown = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710141042/https://extdist.wmflabs.org/dist/extensions/Lockdown-REL1_40-7d900ed.tar.gz";
|
||||
sha256 = "sha256-TgoL9IcwY4EBNUsoVBqpUehVO7TEDT22FoH7Ep4dMxw=";
|
||||
};
|
||||
# TODO: replace with https://www.mediawiki.org/wiki/Extension:DynamicPageList3
|
||||
intersection = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710142223/https://extdist.wmflabs.org/dist/extensions/intersection-REL1_40-f3c1559.tar.gz";
|
||||
sha256 = "sha256-/Ap56EOfsAlx/gkN8Y+NdU28yuZsZmrrBMmuNoi88/A=";
|
||||
};
|
||||
# requires PluggableAuth
|
||||
LDAPAuthentication2 =
|
||||
let
|
||||
src = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710142325/https://extdist.wmflabs.org/dist/extensions/LDAPAuthentication2-REL1_40-2864ae9.tar.gz";
|
||||
sha256 = "sha256-LWXpmgzUpgEaPe/4cwF2cmJxPkW8ywT7gRAlB58mDfY=";
|
||||
};
|
||||
in
|
||||
# TODO: remove with next release
|
||||
pkgs.runCommand "LDAPAuthentication2" { } ''
|
||||
mkdir $out
|
||||
cp -r ${src}/* $out
|
||||
sed 's/"PluggableAuth": "6.*"/"PluggableAuth": "*"/g' -i $out/extension.json
|
||||
'';
|
||||
LDAPProvider = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710141035/https://extdist.wmflabs.org/dist/extensions/LDAPProvider-REL1_40-99edc23.tar.gz";
|
||||
sha256 = "sha256-DYq5CCm//rc6Mei9K6S2Ue+hzz6PYHnwpbJouFS5j+o=";
|
||||
};
|
||||
PluggableAuth = pkgs.fetchzip {
|
||||
url = "https://web.archive.org/web/20230710142618/https://extdist.wmflabs.org/dist/extensions/PluggableAuth-REL1_40-519c6d2.tar.gz";
|
||||
sha256 = "sha256-N1+OV1UdzvU4iXhaS/+fuEoAXqrkVyyEPDirk0vrT8A=";
|
||||
};
|
||||
};
|
||||
# initial admin user password
|
||||
passwordFile = config.sops.secrets."mediawiki/adminPassword".path;
|
||||
database = {
|
||||
type = "postgres";
|
||||
socket = "/run/postgresql";
|
||||
};
|
||||
uploadsDir = "/var/lib/mediawiki/uploads";
|
||||
};
|
||||
|
||||
phpfpm.phpPackage = pkgs.php.buildEnv {
|
||||
|
|
Loading…
Reference in New Issue