Enable mailing for Mediawiki

This commit is contained in:
Nicolas Jeannerod 2024-11-22 17:40:26 +01:00
parent d9c5da6f8b
commit a9f9d4f1a0
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8
5 changed files with 38 additions and 6 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { config, ... }:
{ {
services.phpfpm.pools.mediawiki.phpOptions = '' services.phpfpm.pools.mediawiki.phpOptions = ''
@ -11,7 +11,7 @@
name = "Fediversity Wiki"; name = "Fediversity Wiki";
webserver = "nginx"; webserver = "nginx";
nginx.hostName = "wiki.fediversity.eu"; nginx.hostName = "wiki.fediversity.eu";
passwordFile = pkgs.writeText "password" "eiM9etha8ohmo9Ohphahpesiux0ahda6"; passwordFile = config.age.secrets.wiki-password.path;
extraConfig = '' extraConfig = ''
# Disable anonymous editing # Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['edit'] = false;
@ -24,7 +24,7 @@
## Permissions ## Permissions
$wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['createaccount'] = true;
$wgGroupPermissions['*']['autocreateaccount'] = true; $wgGroupPermissions['*']['autocreateaccount'] = true;
$wgGroupPermissions['user']['edit'] = true; $wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['user']['createaccount'] = true; $wgGroupPermissions['user']['createaccount'] = true;
@ -35,6 +35,19 @@
$wgUploadSizeWarning = 1024*1024*512; $wgUploadSizeWarning = 1024*1024*512;
$wgMaxUploadSize = 1024*1024*1024; $wgMaxUploadSize = 1024*1024*1024;
$wgEnableEmail = true;
$wgPasswordSender = "wiki@fediversity.eu";
$wgEmergencyContact = "wiki@fediversity.eu";
$wgSMTP = [
'host' => 'mail.protagio.nl',
'IDHost' => 'fediversity.eu',
'localhost' => 'fediversity.eu',
'port' => 587,
'auth' => true,
'username' => 'wiki@fediversity.eu',
];
require_once("${config.age.secrets.wiki-smtp-password.path}");
$wgHeadScriptCode = <<<'END' $wgHeadScriptCode = <<<'END'
<link rel=me href="https://mastodon.fediversity.eu/@fediversity"> <link rel=me href="https://mastodon.fediversity.eu/@fediversity">
END; END;
@ -45,17 +58,19 @@
}; };
}; };
age.secrets.wiki-smtp-password.owner = "mediawiki";
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts."wiki.fediversity.eu" = { virtualHosts."wiki.fediversity.eu" = {
basicAuth = { basicAuthFile = config.age.secrets.wiki-basicauth-htpasswd.path;
fediv = "SecretSauce123!";
};
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
}; };
}; };
age.secrets.wiki-basicauth-htpasswd.owner = "nginx";
security.acme = { security.acme = {
acceptTerms = true; acceptTerms = true;
defaults.email = "systeemmail@procolix.com"; defaults.email = "systeemmail@procolix.com";

View file

@ -30,5 +30,8 @@ concatMapAttrs
vm02179 vm02179
vm02186 vm02186
]; ];
wiki-basicauth-htpasswd = [ vm02187 ];
wiki-password = [ vm02187 ];
wiki-smtp-password = [ vm02187 ];
} }
) )

Binary file not shown.

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 1MUEqQ yJ53uyB0OqgbyZS+0Qu/glWZGqx8ALEr2Z0hKUrQgUg
Ewvye5oREhNCASqyql56m2mNbAGnK69fVkjZ0N2ILMk
-> ssh-ed25519 dgBsjw glI8t7C/N4BqpnuZlCnv6TFb+YUQn+0oAjbJI7GrzWw
qFxxFVt2R6FkupbP7qErZ+VFHYwEHVmY4iC6hyEf+Vg
--- fQbt68Fdj7wk8mWFx0W0Z1iRbkWxxK7+zIKw/v+BCE0
¢OÕ+Q±×‰F¾^0縿9ãÕ?\TeËB(ügs½³°¹'—™7…ì§ÁˆŒ(ÁO=>³<)h`qè&<26>^

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 1MUEqQ 4BpvvqFr+tmHeapy7bk3uS6fCS/CbeYkAJuxb5r1g00
YVGpim5rYSzHMTA85lcTy22Fr5464Axdy/nKR3/z8RA
-> ssh-ed25519 dgBsjw mF++5ewvC+oordjFMR82SvGukQTYhqnH80nIgzUkunA
siCm1cQfuzs0I1xl1ACv6gomHmfONqGcxmj2fa4oABY
--- 2dszG1nnnEflzPy+dRj/0CW39mq49QPdgw+to8T1fRg
ûãÆ&£ñ;D÷3í¸s[ÿ±†-«0=x«yËÓ+&MD õËÅie¾ðà/|qßÁ3r´|iIŒÕ~ ˜ÃÄ¢­RfCÕ`Jšòþå