summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-06-10 13:27:35 -0400
committerCara Salter <cara@devcara.com>2022-06-10 13:32:03 -0400
commitc9ff6a9d85fb50e0760acad921709582c2e402cb (patch)
tree3147c1975a3006ca2eea545ca9db9043e3c89d05 /flake.nix
parentb4f44d8fa362ddf3f63ba01f03ea14b072b8e76c (diff)
downloadhomeworld-c9ff6a9d85fb50e0760acad921709582c2e402cb.tar.gz
homeworld-c9ff6a9d85fb50e0760acad921709582c2e402cb.zip
flake: Add firewall hole
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix9
1 files changed, 9 insertions, 0 deletions
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
+ ];
};
};