NixOS/hosts/luna/modules/services/nginx.nix
Price Hiller 6bd8593220
feat(luna): add blog
TODO: Use the blog as a flake input to auto update it with the new
articles
2023-10-30 08:50:46 -05:00

31 lines
669 B
Nix

{ config, specialArgs, ... }:
let
blog-host = "blog.orion-technologies.io";
in
{
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";
};
}