From c9ff6a9d85fb50e0760acad921709582c2e402cb Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Fri, 10 Jun 2022 13:27:35 -0400 Subject: flake: Add firewall hole --- flake.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index fa2148d..693a8a2 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,11 @@ default = "/var/lib/homeworld/.env"; description = "The location of the environment file"; }; + services.homeworld.port = lib.mkOption { + type = lib.types.port; + default = 4000; + description = "The port that will be exposed"; + }; }; config = lib.mkIf config.services.homeworld.enable { @@ -92,6 +97,10 @@ }; services.postgresql.enable = true; + + networking.firewall.allowedTCPPorts = [ + config.services.homeworld.port + ]; }; }; -- cgit v1.2.3