9 inherit (lib) mkOption types;
10 cfg = config.services.prometheus.exporters.fritz;
11 yaml = pkgs.formats.yaml { };
12 configFile = yaml.generate "fritz-exporter.yaml" cfg.settings;
19 description = "Configuration settings for fritz-exporter.";
20 type = types.submodule {
21 freeformType = yaml.type;
24 # Pull existing port option into config file.
31 # Pull existing listen address option into config file.
32 listen_address = mkOption {
34 default = cfg.listenAddress;
38 log_level = mkOption {
48 Log level to use for the exporter.
53 description = "Fritz!-devices to monitor using the exporter.";
57 freeformType = yaml.type;
64 Name to use for the device.
69 default = "fritz.box";
71 Hostname under which the target device is reachable.
77 Username to authenticate with the target device.
80 password_file = mkOption {
83 Path to a file which contains the password to authenticate with the target device.
84 Needs to be readable by the user the exporter runs under.
87 host_info = mkOption {
90 Enable extended host info for this device. *Warning*: This will heavily increase scrape time.
104 ExecStart = utils.escapeSystemdExecArgs (
106 (lib.getExe pkgs.fritz-exporter)