about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-05-05 15:38:33 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-05-05 15:38:33 +0900
commit1fcca83f36729836b40adfd80e356e2a680389f1 (patch)
tree5e215e7dbd4a7f84110e7030b79ff8f17d2ea446
parent255f3f3a8f584ee3bb8fea298aef4313fdbc1a38 (diff)
downloadnixos-conf-1fcca83f36729836b40adfd80e356e2a680389f1.tar.gz
Try out subdomain wildcard
-rw-r--r--configuration.nix17
1 files 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";
+        };
       };
     };