2024-05-03 14:35:00 -05:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
fqdn,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
security.acme = {
|
|
|
|
acceptTerms = true;
|
|
|
|
defaults.email = "price@orion-technologies.io";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."blog.${fqdn}" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = inputs.blog.packages.${pkgs.system}.default;
|
2024-07-26 12:08:18 -05:00
|
|
|
locations."/".extraConfig = ''
|
|
|
|
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
|
|
|
|
return 302 /$1;
|
|
|
|
}
|
|
|
|
try_files $uri $uri.html $uri/ =404;
|
|
|
|
'';
|
2024-05-03 14:35:00 -05:00
|
|
|
locations."/".index = "home.html";
|
|
|
|
};
|
|
|
|
}
|