---
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: "nginx",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (9, 3),
        },
       ],
      },
      Int {
       value: 9113,
       position: (9, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (10, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "scrapeUri",
            position: (11, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (11, 17),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (12, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (12, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (12, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (13, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "http://localhost/nginx_status",
                 position: (13, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (14, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Address to access the nginx status page.\nCan be enabled with services.nginx.statusPage = true.\n",
                 position: (15, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (11, 26),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "telemetryPath",
            position: (19, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (19, 21),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (20, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (20, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (20, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (21, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/metrics",
                 position: (21, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (22, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Path under which to expose metrics.\n",
                 position: (23, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (19, 30),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "sslVerify",
            position: (26, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (26, 17),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (27, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (27, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bool",
                  position: (27, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (28, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (28, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (29, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Whether to perform certificate verification for https.\n",
                 position: (30, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (26, 26),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "constLabels",
            position: (33, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (33, 19),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (34, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (34, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listOf",
                   position: (34, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (34, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (34, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (35, 7),
                },
               ],
              },
              List {
               elements: [],
               position: (35, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (36, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "label1=value1",
                   position: (37, 10),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "label2=value2",
                   position: (38, 10),
                  },
                 ],
                },
               ],
               position: (36, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (40, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "A list of constant labels that will be used in every metric.\n",
                 position: (41, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (33, 28),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (10, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (45, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkMerge",
        position: (45, 17),
       },
       arguments: [
        BinaryOperation {
         operator: Concatenation,
         operands: [
          List {
           elements: [
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "serviceConfig",
                  position: (46, 5),
                 },
                ],
               },
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "ExecStart",
                     position: (47, 7),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "",
                     position: (48, 1),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "pkgs",
                       position: (48, 11),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "prometheus-nginx-exporter",
                         position: (48, 16),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: "/bin/nginx-prometheus-exporter \\\n  --nginx.scrape-uri=",
                     position: (48, 42),
                    },
                    Raw {
                     content: "'",
                     position: (49, 30),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (49, 33),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "scrapeUri",
                         position: (49, 37),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: "' \\\n  --nginx.ssl-verify=",
                     position: (49, 47),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "boolToString",
                       position: (50, 32),
                      },
                      arguments: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (50, 45),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "sslVerify",
                           position: (50, 49),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                    Raw {
                     content: " \\\n  --web.listen-address=",
                     position: (50, 59),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (51, 34),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "listenAddress",
                         position: (51, 38),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: ":",
                     position: (51, 52),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "toString",
                       position: (51, 55),
                      },
                      arguments: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (51, 64),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "port",
                           position: (51, 68),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                    Raw {
                     content: " \\\n  --web.telemetry-path=",
                     position: (51, 73),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (52, 34),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "telemetryPath",
                         position: (52, 38),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: " \\\n  --prometheus.const-labels=",
                     position: (52, 52),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "concatStringsSep",
                       position: (53, 39),
                      },
                      arguments: [
                       String {
                        parts: [
                         Raw {
                          content: ",",
                          position: (53, 57),
                         },
                        ],
                       },
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (53, 60),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "constLabels",
                           position: (53, 64),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                    Raw {
                     content: " \\\n  ",
                     position: (53, 76),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "concatStringsSep",
                       position: (54, 13),
                      },
                      arguments: [
                       String {
                        parts: [
                         Raw {
                          content: " \\\n  ",
                          position: (54, 31),
                         },
                        ],
                       },
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (54, 40),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "extraFlags",
                           position: (54, 44),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                    Raw {
                     content: "\n",
                     position: (54, 55),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (46, 21),
               },
              ),
             ],
             recursive: false,
             position: (45, 27),
            },
           ],
           position: (45, 26),
          },
          List {
           elements: [
            FunctionApplication {
             function: Variable {
              identifier: "mkIf",
              position: (57, 11),
             },
             arguments: [
              PropertyAccess {
               expression: Variable {
                identifier: "config",
                position: (57, 16),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "services",
                  position: (57, 23),
                 },
                 Raw {
                  content: "nginx",
                  position: (57, 32),
                 },
                 Raw {
                  content: "enable",
                  position: (57, 38),
                 },
                ],
               },
               default: None,
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "after",
                    position: (58, 5),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "nginx.service",
                      position: (58, 16),
                     },
                    ],
                   },
                  ],
                  position: (58, 13),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "requires",
                    position: (59, 5),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "nginx.service",
                      position: (59, 19),
                     },
                    ],
                   },
                  ],
                  position: (59, 16),
                 },
                ),
               ],
               recursive: false,
               position: (57, 45),
              },
             ],
            },
           ],
           position: (57, 9),
          },
         ],
         position: (57, 6),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "imports",
         position: (61, 3),
        },
       ],
      },
      List {
       elements: [
        FunctionApplication {
         function: Variable {
          identifier: "mkRenamedOptionModule",
          position: (62, 6),
         },
         arguments: [
          List {
           elements: [
            String {
             parts: [
              Raw {
               content: "telemetryEndpoint",
               position: (62, 31),
              },
             ],
            },
           ],
           position: (62, 28),
          },
          List {
           elements: [
            String {
             parts: [
              Raw {
               content: "telemetryPath",
               position: (62, 55),
              },
             ],
            },
           ],
           position: (62, 52),
          },
         ],
        },
        FunctionApplication {
         function: Variable {
          identifier: "mkRemovedOptionModule",
          position: (63, 6),
         },
         arguments: [
          List {
           elements: [
            String {
             parts: [
              Raw {
               content: "insecure",
               position: (63, 31),
              },
             ],
            },
           ],
           position: (63, 28),
          },
          String {
           parts: [
            Raw {
             content: "This option was replaced by 'prometheus.exporters.nginx.sslVerify'.\n",
             position: (64, 1),
            },
           ],
          },
         ],
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "options",
              position: (66, 8),
             },
             Raw {
              content: "warnings",
              position: (66, 16),
             },
            ],
           },
           PropertyAccess {
            expression: Variable {
             identifier: "options",
             position: (66, 27),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "warnings",
               position: (66, 35),
              },
             ],
            },
            default: None,
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "options",
              position: (66, 45),
             },
             Raw {
              content: "assertions",
              position: (66, 53),
             },
            ],
           },
           PropertyAccess {
            expression: Variable {
             identifier: "options",
             position: (66, 66),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "assertions",
               position: (66, 74),
              },
             ],
            },
            default: None,
           },
          ),
         ],
         recursive: false,
         position: (66, 6),
        },
       ],
       position: (61, 13),
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}