NixOS/hosts/luna/modules/services/nginx.nix

31 lines
669 B
Nix
Raw Normal View History

{ config, specialArgs, ... }:
let
blog-host = "blog.orion-technologies.io";
in
2023-10-27 23:02:52 -05:00
{
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedTlsSettings = true;
};
security.acme = {
acceptTerms = true;
defaults.email = "price@orion-technologies.io";
};
environment.persistence."${specialArgs.persist-dir}" = {
directories = [
"/var/www/${blog-host}"
];
};
services.nginx.virtualHosts."${blog-host}" = {
addSSL = true;
enableACME = true;
root = "/var/www/${blog-host}";
locations."/".index = "home.html";
};
2023-10-27 23:02:52 -05:00
}