<commit_before>{ config, pkgs, lib, ... }:

with lib;

let cfg = config.services.prometheus.exporters.systemd;

in {
  port = 9558;

  serviceOpts = {
    serviceConfig = {
      ExecStart = ''
        ${pkgs.prometheus-systemd-exporter}/bin/systemd_exporter \
          --web.listen-address ${cfg.listenAddress}:${toString cfg.port}
      '';
      RestrictAddressFamilies = [
        # Need AF_UNIX to collect data
        "AF_UNIX"
      ];
    };
  };
}<commit_msg>nixos/prometheus/systemd: Implement the extraFlags config option.<commit_after>{ config, pkgs, lib, ... }:

with lib;

let cfg = config.services.prometheus.exporters.systemd;

in {
  port = 9558;

  serviceOpts = {
    serviceConfig = {
      ExecStart = ''
        ${pkgs.prometheus-systemd-exporter}/bin/systemd_exporter \
          --web.listen-address ${cfg.listenAddress}:${toString cfg.port} ${concatStringsSep " " cfg.extraFlags}
      '';
      RestrictAddressFamilies = [
        # Need AF_UNIX to collect data
        "AF_UNIX"
      ];
    };
  };
}
{'fraction_non_alphanumeric': 0.1379980563654033, 'fraction_numerical': 0.007774538386783284, 'mean_word_length': 2.503401360544218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4333168', 'n_tokens_mistral': 358, 'n_tokens_neox': 339, 'n_words': 59}