about summary refs log tree commit diff
path: root/ops/nixos/camden
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-04-21T02·17+0100
committerVincent Ambo <tazjin@google.com>2020-04-21T02·17+0100
commit6a2beb5a6a295bd8fa87b14875a73802e8fb5026 (patch)
treeb966e9058ae439acc875c51ec658af26838760cf /ops/nixos/camden
parent557b6b0c5be1129ddc1aaa682cce26448540b8c5 (diff)
feat(ops/nixos/camden): Add vhost for TVL homepage r/650
Diffstat (limited to 'ops/nixos/camden')
-rw-r--r--ops/nixos/camden/default.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/ops/nixos/camden/default.nix b/ops/nixos/camden/default.nix
index b941be03c7d1..42f80b7c5759 100644
--- a/ops/nixos/camden/default.nix
+++ b/ops/nixos/camden/default.nix
@@ -283,6 +283,21 @@ in lib.fix(self: {
       '';
     };
 
+    virtualHosts.tvl = {
+      serverName = "tvl.fyi";
+      useACMEHost = "tvl.fyi";
+      root = depot.web.tvl;
+      addSSL = true;
+
+      extraConfig = ''
+        add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
+
+        location ~* \.(webp|woff2)$ {
+          add_header Cache-Control "public, max-age=31536000";
+        }
+      '';
+    };
+
     virtualHosts.cgit = {
       serverName = "git.tazj.in";
       serverAliases = [ "git.camden.tazj.in" ];