mail.idimitrov.dev/mailserver/nginx/default.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

2023-11-26 12:47:58 +01:00
{ pkgs, ... }:
{
services = {
nginx = {
enable = true;
2023-11-27 14:02:30 +01:00
recommendedGzipSettings = true;
recommendedOptimisation = true;
2023-11-26 12:47:58 +01:00
recommendedProxySettings = true;
recommendedTlsSettings = true;
2023-11-27 14:02:30 +01:00
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
appendHttpConfig = ''
map $scheme $hsts_header {
https "max-age=31536000; includeSubdomains; preload";
}
add_header Strict-Transport-Security $hsts_header;
add_header 'Referrer-Policy' 'origin-when-cross-origin';
add_header X-Content-Type-Options nosniff;
2023-12-01 20:33:32 +01:00
add_header Onion-Location http://sxfx23zafag4lixkb4s6zwih7ga5jnzfgtgykcerd354bvb6u7alnkid.onion;
2023-11-27 14:02:30 +01:00
'';
2023-11-28 15:45:47 +01:00
virtualHosts = {
"idimitrov.dev" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
};
};
"www.idimitrov.dev" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
};
2023-11-26 12:47:58 +01:00
};
2023-12-16 10:50:47 +01:00
"git.idimitrov.dev" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:3001";
};
};
2023-11-26 12:47:58 +01:00
};
};
};
}
2023-12-16 10:50:47 +01:00