2025-12-12 04:30:57 +01:00
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
lib.mkIf config.fireproof.homelab.enable {
|
2025-03-09 20:30:33 +01:00
|
|
|
networking.firewall.allowedTCPPorts = [80 443];
|
|
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
|
enable = true;
|
2025-04-26 20:02:56 +02:00
|
|
|
recommendedTlsSettings = true;
|
|
|
|
|
recommendedOptimisation = true;
|
2025-03-09 20:30:33 +01:00
|
|
|
recommendedProxySettings = true;
|
2025-04-26 20:02:56 +02:00
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
recommendedBrotliSettings = true;
|
2026-01-20 23:41:10 +01:00
|
|
|
|
|
|
|
|
virtualHosts."status.localhost" = {
|
|
|
|
|
listen = [{ addr = "127.0.0.1"; port = 8070; }];
|
|
|
|
|
locations."/metrics" = {
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
stub_status;
|
|
|
|
|
access_log off;
|
|
|
|
|
allow 127.0.0.1;
|
|
|
|
|
allow ::1;
|
|
|
|
|
deny all;
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-03-09 20:30:33 +01:00
|
|
|
};
|
|
|
|
|
security.acme = {
|
|
|
|
|
acceptTerms = true;
|
|
|
|
|
defaults.email = "nickolaj@fireproof.website";
|
|
|
|
|
};
|
|
|
|
|
}
|