2024-08-25 00:28:11 -05:00
|
|
|
{ inputs, pkgs, ... }:
|
2024-05-03 14:35:00 -05:00
|
|
|
{
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
security.acme = {
|
|
|
|
acceptTerms = true;
|
2024-10-19 16:15:57 -05:00
|
|
|
defaults.email = "price@price-hiller.com";
|
2024-05-03 14:35:00 -05:00
|
|
|
};
|
|
|
|
|
2024-10-19 16:15:57 -05:00
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
2024-08-16 02:45:41 -05:00
|
|
|
services.nginx.virtualHosts = {
|
|
|
|
"price-hiller.com" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = inputs.blog.packages.${pkgs.system}.default;
|
|
|
|
locations."/".extraConfig = ''
|
|
|
|
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
|
|
|
|
return 302 /$1;
|
|
|
|
}
|
|
|
|
try_files $uri $uri.html $uri/ =404;
|
|
|
|
'';
|
|
|
|
locations."/".index = "home.html";
|
|
|
|
};
|
2024-05-03 14:35:00 -05:00
|
|
|
};
|
2024-10-19 16:15:57 -05:00
|
|
|
}
|