nixos

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 0b71192285051c5cd55b0d3dfcc8f77d2c881f36
parent 9402edd2f3ed0305d85b83dc8fc9fb25f41400a4
Author: Toni Brown <me@tb148.net>
Date:   Thu, 30 Apr 2026 11:47:33 +0800

switch from cloudflared to caddy

Diffstat:
Aremote/caddy/default.nix | 18++++++++++++++++++
Dremote/cloudflared/default.nix | 9---------
Mremote/default.nix | 2+-
Mremote/matrix-continuwuity/default.nix | 4++++
4 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/remote/caddy/default.nix b/remote/caddy/default.nix @@ -0,0 +1,18 @@ +{...}: { + services.caddy = { + enable = true; + email = "me@tb148.net"; + openFirewall = true; + virtualHosts = { + "vault.tb148.net" = { + extraConfig = "reverse_proxy 127.0.0.1:8222"; + }; + "matrix.tb148.net" = { + extraConfig = "reverse_proxy 127.0.0.1:6167"; + }; + "tb148.net" = { + extraConfig = "reverse_proxy /.well-known/matrix/* 127.0.0.1:6167"; + }; + }; + }; +} diff --git a/remote/cloudflared/default.nix b/remote/cloudflared/default.nix @@ -1,9 +0,0 @@ -{...}: { - services.cloudflared = { - enable = true; - tunnels."9fa561dc-d9b5-4b26-a351-d8248b10e6f9" = { - credentialsFile = "/home/admin/.cloudflared/9fa561dc-d9b5-4b26-a351-d8248b10e6f9.json"; - default = "http_status:404"; - }; - }; -} diff --git a/remote/default.nix b/remote/default.nix @@ -2,7 +2,7 @@ imports = [ ./boot/. ./btrbk/. - ./cloudflared/. + ./caddy/. ./filesystem/. ./localization/. ./matrix-continuwuity/. diff --git a/remote/matrix-continuwuity/default.nix b/remote/matrix-continuwuity/default.nix @@ -17,6 +17,10 @@ }; settings.global = { server_name = "tb148.net"; + well_known = { + client = "https://matrix.tb148.net"; + server = "matrix.tb148.net:443"; + }; allow_registration = false; allow_encryption = true; allow_federation = true;