---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "options",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "prometheus",
         position: (6, 25),
        },
        Raw {
         content: "exporters",
         position: (6, 36),
        },
        Raw {
         content: "collectd",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (9, 3),
        },
       ],
      },
      Int {
       value: 9103,
       position: (9, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (10, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "collectdBinary",
            position: (11, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (12, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (12, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "collectd binary protocol receiver",
                 position: (12, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "authFile",
               position: (14, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (14, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (15, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "null",
                  position: (15, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (16, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (16, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "nullOr",
                      position: (16, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (16, 29),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "path",
                       position: (16, 35),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (17, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "File mapping user names to pre-shared keys (passwords).",
                    position: (17, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (14, 27),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (20, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (20, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (21, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (21, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "int",
                     position: (21, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (22, 9),
                   },
                  ],
                 },
                 Int {
                  value: 25826,
                  position: (22, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Network address on which to accept collectd binary network packets.",
                    position: (23, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (20, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "listenAddress",
               position: (26, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 23),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (27, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (27, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (27, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (28, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "0.0.0.0",
                    position: (28, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (29, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Address to listen on for binary network packets.\n",
                    position: (30, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (26, 32),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "securityLevel",
               position: (34, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (34, 23),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (35, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (35, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "enum",
                      position: (35, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   List {
                    elements: [
                     String {
                      parts: [
                       Raw {
                        content: "None",
                        position: (35, 29),
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "Sign",
                        position: (35, 36),
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "Encrypt",
                        position: (35, 43),
                       },
                      ],
                     },
                    ],
                    position: (35, 27),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (36, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "None",
                    position: (36, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (37, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Minimum required security level for accepted packets.\n",
                    position: (38, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (34, 32),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (11, 22),
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "logFormat",
            position: (43, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (43, 17),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (44, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (44, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "enum",
                   position: (44, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                List {
                 elements: [
                  String {
                   parts: [
                    Raw {
                     content: "logfmt",
                     position: (44, 28),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "json",
                     position: (44, 37),
                    },
                   ],
                  },
                 ],
                 position: (44, 25),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (45, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "logfmt",
                 position: (45, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (46, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "json",
                 position: (46, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (47, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Set the log format.\n",
                 position: (48, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (43, 26),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "logLevel",
            position: (52, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (52, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (53, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (53, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "enum",
                   position: (53, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                List {
                 elements: [
                  String {
                   parts: [
                    Raw {
                     content: "debug",
                     position: (53, 27),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "info",
                     position: (53, 35),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "warn",
                     position: (53, 42),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "error",
                     position: (53, 49),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "fatal",
                     position: (53, 57),
                    },
                   ],
                  },
                 ],
                 position: (53, 25),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (54, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "info",
                 position: (54, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (55, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Only log messages with the given severity or above.\n",
                 position: (56, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (52, 25),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (10, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (60, 3),
        },
       ],
      },
      LetIn {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "collectSettingsArgs",
            position: (61, 5),
           },
          ],
         },
         IfThenElse {
          predicate: PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (61, 31),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "collectdBinary",
              position: (61, 35),
             },
             Raw {
              content: "enable",
              position: (61, 50),
             },
            ],
           },
           default: None,
          },
          then: String {
           parts: [
            Raw {
             content: "--collectd.listen-address ",
             position: (62, 1),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (62, 35),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "collectdBinary",
                 position: (62, 39),
                },
                Raw {
                 content: "listenAddress",
                 position: (62, 54),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: ":",
             position: (62, 68),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "toString",
               position: (62, 71),
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (62, 80),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "collectdBinary",
                   position: (62, 84),
                  },
                  Raw {
                   content: "port",
                   position: (62, 99),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            },
            Raw {
             content: " \\\n--collectd.security-level ",
             position: (62, 104),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (63, 35),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "collectdBinary",
                 position: (63, 39),
                },
                Raw {
                 content: "securityLevel",
                 position: (63, 54),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: " \\\n",
             position: (63, 68),
            },
           ],
          },
          else_: String {
           parts: [],
          },
          position: (61, 27),
         },
        ),
       ],
       target: Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "serviceConfig",
             position: (66, 5),
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "ExecStart",
                position: (67, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "",
                position: (68, 1),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (68, 11),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "prometheus-collectd-exporter",
                    position: (68, 16),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "/bin/collectd_exporter \\\n  --log.format ",
                position: (68, 45),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "escapeShellArg",
                  position: (69, 26),
                 },
                 arguments: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (69, 41),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "logFormat",
                      position: (69, 45),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               },
               Raw {
                content: " \\\n  --log.level ",
                position: (69, 55),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (70, 25),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "logLevel",
                    position: (70, 29),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " \\\n  --web.listen-address ",
                position: (70, 38),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (71, 34),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "listenAddress",
                    position: (71, 38),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: ":",
                position: (71, 52),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (71, 55),
                 },
                 arguments: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (71, 64),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "port",
                      position: (71, 68),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               },
               Raw {
                content: " \\\n  ",
                position: (71, 73),
               },
               Expression {
                expression: Variable {
                 identifier: "collectSettingsArgs",
                 position: (72, 13),
                },
               },
               Raw {
                content: " \\\n  ",
                position: (72, 33),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "concatStringsSep",
                  position: (73, 13),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: " \\\n  ",
                     position: (73, 31),
                    },
                   ],
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (73, 40),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "extraFlags",
                      position: (73, 44),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               },
               Raw {
                content: "\n",
                position: (73, 55),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (66, 21),
          },
         ),
        ],
        recursive: false,
        position: (65, 6),
       },
       position: (60, 17),
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}