fix(monitoring): more firewall rules

This commit is contained in:
arcnmx 2024-05-30 14:25:11 -07:00
parent 60f7042211
commit 3f33177ae5
2 changed files with 18 additions and 2 deletions

View file

@ -3,8 +3,9 @@
lib,
...
}: let
inherit (builtins) toJSON toString;
inherit (builtins) toString;
inherit (lib.options) mkOption;
inherit (lib.modules) mkIf;
inherit (lib.types) port;
cfg = config.services.promtail;
in {
@ -20,4 +21,7 @@ in {
"--server.http-listen-port=${toString cfg.settings.httpListenPort}"
];
};
config.networking.firewall.interfaces.lan = mkIf cfg.enable {
allowedTCPPorts = [ cfg.settings.httpListenPort ];
};
}