2024-11-18 11:30:00 +01:00
|
|
|
|
{ pkgs, ... }:
|
2024-11-18 10:48:16 +01:00
|
|
|
|
|
|
|
|
|
{
|
2024-11-20 13:29:44 +01:00
|
|
|
|
imports = [ ../common ];
|
|
|
|
|
|
|
|
|
|
procolix.vm = {
|
|
|
|
|
name = "vm02187";
|
|
|
|
|
ip4 = "185.206.232.187";
|
|
|
|
|
ip6 = "2a00:51c0:12:1201::187";
|
|
|
|
|
};
|
|
|
|
|
|
2024-11-18 10:48:16 +01:00
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
|
|
services.phpfpm.pools.mediawiki.phpOptions = ''
|
|
|
|
|
upload_max_filesize = 1024M;
|
|
|
|
|
post_max_size = 1024M;
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
services.mediawiki = {
|
|
|
|
|
enable = true;
|
2024-11-18 11:30:00 +01:00
|
|
|
|
name = "Fediversity Wiki";
|
2024-11-18 10:48:16 +01:00
|
|
|
|
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;
|
2024-11-20 13:07:03 +01:00
|
|
|
|
$wgAllowExternalImages = false;
|
2024-11-18 11:30:00 +01:00
|
|
|
|
|
2024-11-18 10:48:16 +01:00
|
|
|
|
## 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;
|
2024-11-18 11:30:00 +01:00
|
|
|
|
|
2024-11-18 10:48:16 +01:00
|
|
|
|
$wgHeadScriptCode = <<<'END'
|
|
|
|
|
<link rel=me href="https://mastodon.fediversity.eu/@fediversity">
|
|
|
|
|
END;
|
2024-11-18 11:30:00 +01:00
|
|
|
|
'';
|
2024-11-18 10:48:16 +01:00
|
|
|
|
|
2024-11-18 11:30:00 +01:00
|
|
|
|
extensions = {
|
|
|
|
|
VisualEditor = null;
|
|
|
|
|
};
|
2024-11-18 10:48:16 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
|
enable = true;
|
|
|
|
|
virtualHosts."wiki.fediversity.eu" = {
|
2024-11-18 11:30:00 +01:00
|
|
|
|
basicAuth = {
|
|
|
|
|
fediv = "SecretSauce123!";
|
|
|
|
|
};
|
2024-11-18 10:48:16 +01:00
|
|
|
|
forceSSL = true;
|
|
|
|
|
enableACME = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
security.acme = {
|
|
|
|
|
acceptTerms = true;
|
|
|
|
|
defaults.email = "systeemmail@procolix.com";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
users.users.nginx.extraGroups = [ "acme" ];
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
# $ nix search wget
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
(pkgs.vim_configurable.customize {
|
|
|
|
|
name = "vim";
|
|
|
|
|
vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
|
|
|
|
|
start = [ vim-nix ]; # load plugin on startup
|
|
|
|
|
};
|
|
|
|
|
vimrcConfig.customRC = ''
|
|
|
|
|
" your custom vimrc
|
|
|
|
|
set nocompatible
|
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
|
" Turn on syntax highlighting by default
|
|
|
|
|
syntax on
|
|
|
|
|
" ...
|
|
|
|
|
'';
|
|
|
|
|
})
|
|
|
|
|
wget
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "24.05"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
}
|