nixos/prometheus-exporters: fix default firewall filter

Instead of always using the default port of one exporter for its default
firewall filter, the port from the current service configuration is used.
gstqt5
WilliButz 2020-09-07 10:14:33 +02:00
parent 0ecc8b9a56
commit 5d51096839
No known key found for this signature in database
GPG Key ID: 92582A10F1179CB2
1 changed files with 2 additions and 1 deletions

View File

@ -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}"
'';