From f218f2fd56a9247a8a33ef2a8c22de9c4d22fb5e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 24 Aug 2021 14:07:42 +0300 Subject: feat(ops): Serve nixery.dev from whitby Adds a new module for the nixery.dev domain and serves it from whitby. Note that the DNS records do *not* point to whitby yet, so deploying this will lead to a failed TLS provisioning unit - but this is intentional. Change-Id: I911f67a0aa24f8df3cb52d2cfc49a8b6132cf718 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3383 Tested-by: BuildkiteCI Reviewed-by: sterni --- ops/machines/whitby/default.nix | 1 + ops/modules/www/nixery.dev.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ops/modules/www/nixery.dev.nix diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix index 5b4ac3e1b524..c497bad488d4 100644 --- a/ops/machines/whitby/default.nix +++ b/ops/machines/whitby/default.nix @@ -28,6 +28,7 @@ in { "${depot.path}/ops/modules/www/cs.tvl.fyi.nix" "${depot.path}/ops/modules/www/images.tvl.fyi.nix" "${depot.path}/ops/modules/www/login.tvl.fyi.nix" + "${depot.path}/ops/modules/www/nixery.dev.nix" "${depot.path}/ops/modules/www/status.tvl.su.nix" "${depot.path}/ops/modules/www/tazj.in.nix" "${depot.path}/ops/modules/www/todo.tvl.fyi.nix" diff --git a/ops/modules/www/nixery.dev.nix b/ops/modules/www/nixery.dev.nix new file mode 100644 index 000000000000..05dc88c66a07 --- /dev/null +++ b/ops/modules/www/nixery.dev.nix @@ -0,0 +1,21 @@ +{ config, ... }: + +{ + imports = [ + ./base.nix + ]; + + config = { + services.nginx.virtualHosts."nixery.dev" = { + serverName = "nixery.dev"; + enableACME = true; + forceSSL = true; + + extraConfig = '' + location / { + proxy_pass http://localhost:${toString config.services.depot.nixery.port}; + } + ''; + }; + }; +} -- cgit 1.4.1