Skip to content

Commit

Permalink
nixos/prometheus-exporters: fix default firewall filter
Browse files Browse the repository at this point in the history
Instead of always using the default port of one exporter for its default
firewall filter, the port from the current service configuration is used.
  • Loading branch information
WilliButz committed Sep 7, 2020
1 parent 0ecc8b9 commit 5d51096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nixos/modules/services/monitoring/prometheus/exporters.nix
Expand Up @@ -84,7 +84,8 @@ let
};
firewallFilter = mkOption {
type = types.str;
default = "-p tcp -m tcp --dport ${toString port}";
default = "-p tcp -m tcp --dport ${toString cfg.${name}.port}";
defaultText = "-p tcp -m tcp --dport ${toString port}";
example = literalExample ''
"-i eth0 -p tcp -m tcp --dport ${toString port}"
'';
Expand Down

0 comments on commit 5d51096

Please sign in to comment.