From fba04cf0a1274086b2aa0a1a70c1ac2b804493c0 Mon Sep 17 00:00:00 2001 From: Jimbo Date: Thu, 5 Sep 2024 00:43:31 -0400 Subject: [PATCH] The CloudflareD commit. To be undone immediately --- nixos/server.nix | 2 +- nixos/server/cloudflared.nix | 16 ++++++++++++++++ secrets.nix | Bin 1900 -> 2128 bytes 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 nixos/server/cloudflared.nix diff --git a/nixos/server.nix b/nixos/server.nix index ec583dc..6acb045 100644 --- a/nixos/server.nix +++ b/nixos/server.nix @@ -20,7 +20,7 @@ # Services ./services/openssh.nix ./server/acme.nix - ./server/ddclient.nix + ./server/cloudflared.nix ./server/docker.nix ./server/firewall.nix ./server/gitea.nix diff --git a/nixos/server/cloudflared.nix b/nixos/server/cloudflared.nix new file mode 100644 index 0000000..289b354 --- /dev/null +++ b/nixos/server/cloudflared.nix @@ -0,0 +1,16 @@ +{pkgs, outputs, ...}: { + services.cloudflared = { + enable = true; + tunnels = { + "${outputs.secrets.flareTunnelName}" = { + credentialsFile = "${pkgs.writeText "credentials" outputs.secrets.flareTunnelApi}"; + default = "http_status:404"; + ingress = { + "*.${outputs.secrets.jimDomain}" = { + service = "https://localhost:443"; + }; + }; + }; + }; + }; +} diff --git a/secrets.nix b/secrets.nix index dea9ce7de973c0752e71152e8bf6b4c44997097a..fb5c7674267449b4eac3a028342c25bfed446924 100644 GIT binary patch literal 2128 zcmV-W2(R}5M@dveQdv+`00c`OqtmtJz#)wXqA$0Yfr4ID`5)%;3ELyUY=?{7c57iO zmw^CAr%yjRfM9~q?wsa-L@W7Cy213)r zxs7`{NWVXBlc4HhMu1@0$58ofAT3Ul@+q<=n|i$}^w$h<^9<75_`(8?CjVGPDS4JJ zKX&}+eP(9(wanA~=v@-yxnd>&8l69h?$vMfcvMYquXr%;VYy-H{EmsAXO|La17blu zCw+_T7_+#o*6JuWQT3{+y=?g97R#S=CDs|bkoI+`q-_XNytyr{zSIrI+gtS+*pmz? z&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