From 09edb5202ad52e6fbf9580683a0a0c4b85e3cfe8 Mon Sep 17 00:00:00 2001 From: sefidel Date: Thu, 7 Mar 2024 20:39:34 +0900 Subject: fix(modules/expose): fix cloudflare tunnel This commit fixes cloudflare tunnel connections failing with `tls: unrecognized name`, which was caused by the https endpoint not having a valid certificate for 'localhost'. --- modules/expose.nix | 5 +---- nixos/kanata/configuration.nix | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/expose.nix b/modules/expose.nix index 3598777..85fdcca 100644 --- a/modules/expose.nix +++ b/modules/expose.nix @@ -83,10 +83,7 @@ in services.cloudflared.tunnels."${cfg.cloudflareUUID}" = { credentialsFile = cfg.secrets.cloudflare-credentials; ingress = mapAttrs - (_: v: - if v.configureNginx - then "https://localhost:443" - else v.to) + (_: v: v.to) (filterAttrs (_: v: v.cf) cfg.routes); } // optionalAttrs (cfg.ssl.enable) { # TODO: This seems to have no effect. Remove? diff --git a/nixos/kanata/configuration.nix b/nixos/kanata/configuration.nix index a64ecf8..323f6ac 100644 --- a/nixos/kanata/configuration.nix +++ b/nixos/kanata/configuration.nix @@ -163,7 +163,7 @@ in # Nginx pre-configured routes "nextcloud.kusanari.network" = { - to = "https://localhost:443"; + to = "http://localhost:80"; configureNginx = false; }; }; -- cgit 1.4.1