From c6111fd247b122f01e8a2780989203db2b68d325 Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Sun, 12 Jan 2025 14:16:22 +0100 Subject: [PATCH] Set custom domains for docs and portfolio --- nix/deploy/prod/default.nix | 28 +++++++++++++++++++++++++++- website/index.html | 2 +- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/nix/deploy/prod/default.nix b/nix/deploy/prod/default.nix index 5e0cfd5..1a6616d 100644 --- a/nix/deploy/prod/default.nix +++ b/nix/deploy/prod/default.nix @@ -1,6 +1,8 @@ { pkgs, localArchtikaPackage, ... }: let domain = "demo.archtika.com"; + docsSubdomain = "docs.archtika.com"; + portfolioDomain = "thilohohlt.com"; in { imports = [ @@ -25,10 +27,34 @@ in defaults.email = "thilo.hohlt@tutanota.com"; certs."${domain}" = { inherit domain; - extraDomainNames = [ "*.${domain}" ]; + extraDomainNames = [ "*.${domain}" docsSubdomain ]; dnsProvider = "porkbun"; environmentFile = /var/lib/porkbun.env; group = "nginx"; }; }; + + services.nginx.virtualHosts."${docsSubdomain}" = { + useACMEHost = domain; + forceSSL = true; + locations = { + "/" = { + root = "/var/www/archtika-websites/archtika/archtika-documentation"; + index = "index.html"; + tryFiles = "$uri $uri/ $uri.html =404"; + }; + }; + }; + + services.nginx.virtualHosts."${portfolioDomain}" = { + enableACME = true; + forceSSL = true; + locations = { + "/" = { + root = "/var/www/archtika-websites/thiloho/thilo-hohlt"; + index = "index.html"; + tryFiles = "$uri $uri/ $uri.html =404"; + }; + }; + }; } diff --git a/website/index.html b/website/index.html index a896441..9a1d7c6 100644 --- a/website/index.html +++ b/website/index.html @@ -17,7 +17,7 @@

FLOSS, modern, performant, lightweight and self‑hosted CMS

GitHub - Documentation + Documentation