about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-07T15·08+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-07T16·17+0000
commit5ba3f2b572f1ed7648d6dd9b0f0e811ef3cdcc4c (patch)
treec6270a19141b9b1bbb0225dbd6940f94ab3b7c8e /nixos
parent431b4980e4e8ff98d916d1356c4f531b0adf6db9 (diff)
Attempt to serve {learn,blog}.wpcarro.dev
Reading an Nginx tutorial and trying to port the information over to NixOS.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/socrates/default.nix22
1 files changed, 12 insertions, 10 deletions
diff --git a/nixos/socrates/default.nix b/nixos/socrates/default.nix
index ef2b6d53bd48..63ff1b342068 100644
--- a/nixos/socrates/default.nix
+++ b/nixos/socrates/default.nix
@@ -115,7 +115,7 @@ in {
 
   # Provision SSL certificates to support HTTPS connections.
   security.acme.acceptTerms = true;
-  security.acme.certs."wpcarro.dev".email = "wpcarro@gmail.com";
+  security.acme.email = "wpcarro@gmail.com";
 
   services.nginx = {
     enable = true;
@@ -141,15 +141,17 @@ in {
       access_log syslog:server=unix:/dev/log json_combined;
     '';
 
-    virtualHosts.blog = {
-      serverName = "blog.wpcarro.dev";
-      useACMEHost = "wpcarro.dev";
-      addSSL = true;
-      extraConfig = ''
-        location / {
-          proxy_pass http://localhost:80
-        }
-      '';
+    virtualHosts = {
+      "learn.wpcarro.dev" = {
+        addSSL = true;
+        enableACME = true;
+        root = "/var/www/learn";
+      };
+      "blog.wpcarro.dev" = {
+        addSSL = true;
+        enableACME = true;
+        root = "/var/www/blog";
+      };
     };
   };