From 1fcca83f36729836b40adfd80e356e2a680389f1 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 5 May 2022 15:38:33 +0900 Subject: Try out subdomain wildcard --- configuration.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/configuration.nix b/configuration.nix index e94e52c..46bebac 100644 --- a/configuration.nix +++ b/configuration.nix @@ -41,10 +41,19 @@ services = { nginx = { enable = true; - virtualHosts."loang.net" = { - enableACME = true; - forceSSL = true; - root = "/var/www/loang.net"; + virtualHosts = let + users = config.users.users; + in { + "loang.net" = { + enableACME = true; + forceSSL = true; + root = "/var/www/loang.net"; + }; + "cnx.loang.net" = { + enableACME = true; + forceSSL = true; + root = "${users.cnx.home}/web"; + }; }; }; -- cgit 1.4.1