From 6b9752e04ceb5f95c937ffee002fa925134e7a35 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Tue, 27 Jun 2023 23:21:28 -0700 Subject: [PATCH] enable reverseproxy on demand --- modules/haproxy.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/haproxy.nix b/modules/haproxy.nix index 72976bb..566c32f 100644 --- a/modules/haproxy.nix +++ b/modules/haproxy.nix @@ -5,6 +5,8 @@ let in { options.shb.reverseproxy = { + enable = lib.mkEnableOption "selfhostblocks.reverseproxy"; + sopsFile = lib.mkOption { type = lib.types.path; description = "Sops file location"; @@ -55,7 +57,7 @@ in }; }; - config = lib.mkIf (cfg.sites != {}) { + config = lib.mkIf cfg.enable { networking.firewall.allowedTCPPorts = [ 80 443 ]; security.acme = {