2023-05-18 17:14:24 +02:00
|
|
|
{ pkgs, config, ... }:
|
2023-01-29 01:51:35 +01:00
|
|
|
{
|
2023-05-18 17:14:24 +02:00
|
|
|
security.acme = {
|
|
|
|
acceptTerms = true;
|
|
|
|
defaults.email = "drift@pvv.ntnu.no";
|
|
|
|
};
|
|
|
|
|
2023-01-29 01:51:35 +01:00
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
|
|
|
virtualHosts = {
|
2023-05-18 17:14:24 +02:00
|
|
|
"bekkalokk.pvv.ntnu.no" = {
|
2023-01-29 01:51:35 +01:00
|
|
|
forceSSL = true;
|
2023-05-18 17:14:24 +02:00
|
|
|
enableACME = true;
|
|
|
|
root = "${config.services.mediawiki.finalPackage}/share/mediawiki";
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
|
|
|
extraConfig = ''
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
fastcgi_pass unix:${config.services.phpfpm.pools.mediawiki.socket};
|
|
|
|
include ${pkgs.nginx}/conf/fastcgi_params;
|
|
|
|
include ${pkgs.nginx}/conf/fastcgi.conf;
|
|
|
|
'';
|
2023-01-29 01:51:35 +01:00
|
|
|
};
|
|
|
|
|
2023-05-18 17:14:24 +02:00
|
|
|
"/images".root = config.services.mediawiki.uploadsDir;
|
|
|
|
|
|
|
|
# "/git" = {
|
|
|
|
# proxyPass = "http://unix:${config.services.gitea.settings.server.HTTP_ADDR}";
|
|
|
|
# proxyWebsockets = true;
|
|
|
|
# };
|
2023-01-29 01:51:35 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|