From e4b4fb9e072db995a70196039a9d29ace8b125e0 Mon Sep 17 00:00:00 2001 From: Yifei Sun Date: Sat, 12 Oct 2024 23:03:39 -0400 Subject: [PATCH] hosts: add redirects --- hosts/server/lagern/plausible.nix | 8 ++++++++ hosts/server/odake/caddy.nix | 10 ++++++++++ hosts/server/odake/hydra.nix | 4 +++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/hosts/server/lagern/plausible.nix b/hosts/server/lagern/plausible.nix index a4832ce..6b41e71 100644 --- a/hosts/server/lagern/plausible.nix +++ b/hosts/server/lagern/plausible.nix @@ -66,6 +66,14 @@ } ''; + services.caddy.virtualHosts."stats.nixolo.gy".extraConfig = '' + import common + reverse_proxy ${toString config.services.plausible.server.listenAddress}:${toString config.services.plausible.server.port} { + header_up Host {host} + header_up X-Real-IP {http.request.header.CF-Connecting-IP} + } + ''; + services.caddy.virtualHosts."toukei.ikaz.uk".extraConfig = '' import common tls { dns cloudflare {env.CF_API_TOKEN_KICHINOSE} } diff --git a/hosts/server/odake/caddy.nix b/hosts/server/odake/caddy.nix index 25029df..9fcf468 100644 --- a/hosts/server/odake/caddy.nix +++ b/hosts/server/odake/caddy.nix @@ -19,6 +19,16 @@ import common reverse_proxy ${toString config.services.hydra.listenHost}:${toString config.services.hydra.port} ''; + + virtualHosts."cache.ysun.co".extraConfig = '' + import common + reverse_proxy ${toString config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port} + ''; + + virtualHosts."hydra.ysun.co".extraConfig = '' + import common + reverse_proxy ${toString config.services.hydra.listenHost}:${toString config.services.hydra.port} + ''; }; age.secrets.cloudflare = { diff --git a/hosts/server/odake/hydra.nix b/hosts/server/odake/hydra.nix index b5307e6..927ab3d 100644 --- a/hosts/server/odake/hydra.nix +++ b/hosts/server/odake/hydra.nix @@ -15,8 +15,10 @@ port = 10069; notificationSender = "hydra@nixolo.gy"; + tracker = ''''; + extraConfig = '' - email_notification = 1 + email_notification = 0 enable = 1 -- 2.45.2