2022-06-26 21:05:53 +02:00
|
|
|
{ config, pkgs, ... }: {
|
|
|
|
security.acme = {
|
|
|
|
defaults.email = "acme@oxapentane.com";
|
|
|
|
acceptTerms = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
|
|
|
|
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
|
|
|
};
|
|
|
|
|
2023-01-24 20:40:41 +01:00
|
|
|
services.nginx.virtualHosts = {
|
|
|
|
"nc.oxapentane.com" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
extraConfig = ''
|
2023-05-01 15:17:31 +02:00
|
|
|
client_max_body_size 512M;
|
2023-01-24 20:40:41 +01:00
|
|
|
'';
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
2023-05-01 15:17:31 +02:00
|
|
|
proxyPass = "http://10.34.45.100:8080";
|
|
|
|
};
|
|
|
|
"/well-known/carddav" = {
|
|
|
|
return = "301 $scheme://$host/remote.php/dav";
|
|
|
|
};
|
|
|
|
"/well-known/caldav" = {
|
|
|
|
return = "301 $scheme://$host/remote.php/dav";
|
|
|
|
};
|
2022-06-26 21:05:53 +02:00
|
|
|
};
|
2023-01-24 20:40:41 +01:00
|
|
|
};
|
2022-06-26 21:05:53 +02:00
|
|
|
|
2023-05-01 15:17:31 +02:00
|
|
|
"music.oxapentane.com" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
extraConfig = ''
|
|
|
|
client_max_body_size 32M;
|
|
|
|
'';
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
|
|
|
proxyPass = "http://10.34.45.101:4533";
|
|
|
|
};
|
2023-01-24 20:40:41 +01:00
|
|
|
};
|
2022-06-26 21:05:53 +02:00
|
|
|
};
|
2023-05-15 16:50:29 +02:00
|
|
|
"news.oxapentane.com" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
extraConfig = ''
|
|
|
|
client_max_body_size 32M;
|
|
|
|
'';
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
|
|
|
proxyPass = "http://10.34.45.102:8080";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-06-26 21:05:53 +02:00
|
|
|
};
|
|
|
|
}
|