about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-03-07 20:39:34 +0900
committersefidel <contact@sefidel.net>2024-03-07 20:43:56 +0900
commit09edb5202ad52e6fbf9580683a0a0c4b85e3cfe8 (patch)
treeb12ad53558724c8b1b70822c38be749b6ab42eea
parentb974c886b40f89242e8ce51af54a2b50db91050e (diff)
downloadnixrc-09edb5202ad52e6fbf9580683a0a0c4b85e3cfe8.tar.gz
nixrc-09edb5202ad52e6fbf9580683a0a0c4b85e3cfe8.zip
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'.
-rw-r--r--modules/expose.nix5
-rw-r--r--nixos/kanata/configuration.nix2
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;
         };
       };