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"; + }; + }