nftable-migration
 1{ lib, config, ... }:
 2{
 3  options = {
 4    prometheus-exporters-node.collectors = lib.mkOption {
 5      type = lib.types.listOf lib.types.str;
 6      default = [
 7        "systemd"
 8        "processes"
 9      ];
10    };
11    prometheus-exporters-node.extraFlags = lib.mkOption {
12      type = lib.types.listOf lib.types.str;
13      default = [
14        "--collector.ethtool"
15        "--collector.softirqs"
16        "--collector.tcpstat"
17      ];
18    };
19  };
20
21  config = {
22    services.prometheus.exporters.node = {
23      enable = true;
24      port = 9000;
25      enabledCollectors = config.prometheus-exporters-node.collectors;
26      inherit (config.prometheus-exporters-node) extraFlags;
27    };
28  };
29}