about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-02-14T11·49+0000
committerVincent Ambo <tazjin@google.com>2020-02-14T11·49+0000
commitbcc797fa2f820b2de9adad46e7e90bbf8f96460e (patch)
tree62da7bff4071a5df2b006454ace379ff55ffddf5
parentc5806a44a728d5a46878f54de7b695321a38559c (diff)
feat(camden): Move to actual tazj.in hostnames r/549
-rw-r--r--ops/nixos/camden/default.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/ops/nixos/camden/default.nix b/ops/nixos/camden/default.nix
index 8176df5c646b..ad59bc07870a 100644
--- a/ops/nixos/camden/default.nix
+++ b/ops/nixos/camden/default.nix
@@ -155,6 +155,17 @@ in pkgs.lib.fix(self: {
     postRun = "systemctl reload nginx";
   };
 
+  security.acme.certs."tazj.in" = {
+    user = "nginx";
+    group = "nginx";
+    webroot = "/var/lib/acme/acme-challenge";
+    extraDomains = {
+      "git.tazj.in" = null;
+      "www.tazj.in" = null;
+    };
+    postRun = "systemctl reload nginx";
+  };
+
   # serve my website
   services.nginx = {
     enable = true;
@@ -182,9 +193,9 @@ in pkgs.lib.fix(self: {
     '';
 
     virtualHosts.homepage = {
-      serverName = "camden.tazj.in"; # TODO(tazjin): change to actual host later
+      serverName = "tazj.in"; # TODO(tazjin): change to actual host later
       default = true;
-      useACMEHost = "camden.tazj.in";
+      useACMEHost = "tazj.in";
       root = pkgs.web.homepage;
       addSSL = true;
 
@@ -212,8 +223,8 @@ in pkgs.lib.fix(self: {
     };
 
     virtualHosts.cgit = {
-      serverName = "git.camden.tazj.in";
-      useACMEHost = "camden.tazj.in";
+      serverName = "git.tazj.in";
+      useACMEHost = "tazj.in";
       addSSL = true;
 
       extraConfig = ''