{ pkgs, ... }: { imports = [ ../common ]; procolix.vm = { name = "vm02187"; ip4 = "185.206.232.187"; ip6 = "2a00:51c0:12:1201::187"; }; services.phpfpm.pools.mediawiki.phpOptions = '' upload_max_filesize = 1024M; post_max_size = 1024M; ''; services.mediawiki = { enable = true; name = "Fediversity Wiki"; webserver = "nginx"; nginx.hostName = "wiki.fediversity.eu"; passwordFile = pkgs.writeText "password" "eiM9etha8ohmo9Ohphahpesiux0ahda6"; extraConfig = '' # Disable anonymous editing $wgGroupPermissions['*']['edit'] = false; $wgEnableUploads = true; $wgFileExtensions = array('png', 'jpg', 'jpeg', 'svg', 'pdf', 'odt', 'ods', 'brd', 'sch', 'JPG', 'PNG', 'JPEG', 'SVG', 'json', 'mkv', 'mp4', 'gif'); $wgUseImageMagick = true; $wgMaxShellMemory = 524288; $wgSVGMetadataCutoff = 1024*1024; $wgAllowExternalImages = false; ## Permissions $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['autocreateaccount'] = true; $wgGroupPermissions['user']['edit'] = true; $wgGroupPermissions['user']['createaccount'] = true; $wgGroupPermissions['user']['editmyprivateinfo'] = true; $wgGroupPermissions['sysop']['interwiki'] = true; $wgGroupPermissions['sysop']['editwidgets'] = true; # 1 GB ought to be enough for everyone $wgUploadSizeWarning = 1024*1024*512; $wgMaxUploadSize = 1024*1024*1024; $wgHeadScriptCode = <<<'END' END; ''; extensions = { VisualEditor = null; }; }; services.nginx = { enable = true; virtualHosts."wiki.fediversity.eu" = { basicAuth = { fediv = "SecretSauce123!"; }; forceSSL = true; enableACME = true; }; }; security.acme = { acceptTerms = true; defaults.email = "systeemmail@procolix.com"; }; users.users.nginx.extraGroups = [ "acme" ]; }