From e52f52f4dab72bc3798a5054d7693a2c13f68d91 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Fri, 7 Jun 2024 23:46:40 +0200 Subject: [PATCH] Update --- hosts/server/cloudflared.nix | 14 ++++++++++++++ hosts/server/configuration.nix | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 hosts/server/cloudflared.nix diff --git a/hosts/server/cloudflared.nix b/hosts/server/cloudflared.nix new file mode 100644 index 0000000..e6b6d8f --- /dev/null +++ b/hosts/server/cloudflared.nix @@ -0,0 +1,14 @@ +{ + services.cloudflared = { + enable = true; + tunnels = { + "55ac0504-4ba0-4ea7-bf38-6d04ca7e45c3" = { + credentialsFile = "/etc/cloudflaredpwd"; + default = "http_status:404"; + ingress = { + "cloud.anotherhadi.com" = { service = "http://localhost:8080"; }; + }; + }; + }; + }; +} diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 7bbbc02..9e56a68 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -1,7 +1,14 @@ { pkgs, config, ... }: let variable = import ../../variables.nix; in { - imports = [ ./hardware-configuration.nix ./openssh.nix ./nextcloud.nix ./firewall.nix ./nginx.nix ]; + imports = [ + ./hardware-configuration.nix + ./openssh.nix + ./nextcloud.nix + ./firewall.nix + ./nginx.nix + ./cloudflared.nix + ]; boot = { loader.efi.canTouchEfiVariables = true;