From 6bd8593220aeef9ac7d5644a9fc1f33180924258 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 30 Oct 2023 08:50:46 -0500 Subject: [PATCH] feat(luna): add blog TODO: Use the blog as a flake input to auto update it with the new articles --- hosts/luna/modules/services/nginx.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/hosts/luna/modules/services/nginx.nix b/hosts/luna/modules/services/nginx.nix index 2969d66..91aacaf 100644 --- a/hosts/luna/modules/services/nginx.nix +++ b/hosts/luna/modules/services/nginx.nix @@ -1,4 +1,7 @@ -{ config, ... }: +{ config, specialArgs, ... }: +let + blog-host = "blog.orion-technologies.io"; +in { services.nginx = { enable = true; @@ -11,4 +14,17 @@ 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"; + }; + }