From ce575bf65bb73a8e55a26701879a39b52d67c200 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 30 Sep 2021 23:12:54 +0300 Subject: feat(whitby): Serve //corp/website on tvl.su Change-Id: I21e1ddf9a32568cac8ad2595869ac8670867efa9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3658 Tested-by: BuildkiteCI Reviewed-by: tazjin --- ops/machines/whitby/default.nix | 1 + ops/modules/www/tvl.su.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ops/modules/www/tvl.su.nix (limited to 'ops') diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix index 7cc529c7f8..148c0d15a6 100644 --- a/ops/machines/whitby/default.nix +++ b/ops/machines/whitby/default.nix @@ -36,6 +36,7 @@ in { "${depot.path}/ops/modules/www/tazj.in.nix" "${depot.path}/ops/modules/www/todo.tvl.fyi.nix" "${depot.path}/ops/modules/www/tvl.fyi.nix" + "${depot.path}/ops/modules/www/tvl.su.nix" "${depot.path}/ops/modules/www/wigglydonke.rs.nix" "${pkgs.path}/nixos/modules/services/web-apps/gerrit.nix" ]; diff --git a/ops/modules/www/tvl.su.nix b/ops/modules/www/tvl.su.nix new file mode 100644 index 0000000000..a7c4f6a217 --- /dev/null +++ b/ops/modules/www/tvl.su.nix @@ -0,0 +1,20 @@ +{ depot, ... }: + +{ + imports = [ + ./base.nix + ]; + + config = { + services.nginx.virtualHosts."tvl.su" = { + serverName = "tvl.su"; + root = depot.corp.website; + enableACME = true; + forceSSL = true; + + extraConfig = '' + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; + ''; + }; + }; +} -- cgit 1.4.1