---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
   DestructuredArgument {
    identifier: "options",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "prometheus",
         position: (6, 25),
        },
        Raw {
         content: "exporters",
         position: (6, 36),
        },
        Raw {
         content: "nginxlog",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "port",
         position: (8, 3),
        },
       ],
      },
      to: Int {
       value: 9117,
       position: (8, 10),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "extraOpts",
         position: (9, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "settings",
            position: (10, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (10, 16),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (11, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (11, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "attrs",
                  position: (11, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (12, 7),
                },
               ],
              },
              to: Map {
               bindings: [],
               recursive: false,
               position: (12, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (13, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "All settings of nginxlog expressed as an Nix attrset.\n\nCheck the official documentation for the corresponding YAML\nsettings that can all be used here: https://github.com/martin-helmich/prometheus-nginxlog-exporter\n\nThe `listen` object is already generated by `port`, `listenAddress` and `metricsEndpoint` and\nwill be merged with the value of `settings` before writting it as JSON.\n",
                 position: (14, 1),
                },
               ],
               position: (13, 21),
              },
             },
            ],
            recursive: false,
            position: (10, 25),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "metricsEndpoint",
            position: (24, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (24, 23),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (25, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (25, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "str",
                  position: (25, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (26, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "/metrics",
                 position: (26, 18),
                },
               ],
               position: (26, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (27, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "Path under which to expose metrics.\n",
                 position: (28, 1),
                },
               ],
               position: (27, 21),
              },
             },
            ],
            recursive: false,
            position: (24, 32),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (9, 15),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "serviceOpts",
         position: (33, 3),
        },
       ],
      },
      to: LetIn {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "listenConfig",
            position: (34, 5),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "listen",
               position: (35, 7),
              },
             ],
            },
            to: Map {
             bindings: [
              Binding {
               from: AttributePath {
                parts: [
                 Raw {
                  content: "port",
                  position: (36, 9),
                 },
                ],
               },
               to: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (36, 16),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "port",
                   position: (36, 20),
                  },
                 ],
                },
                default: None,
               },
              },
              Binding {
               from: AttributePath {
                parts: [
                 Raw {
                  content: "address",
                  position: (37, 9),
                 },
                ],
               },
               to: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (37, 19),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "listenAddress",
                   position: (37, 23),
                  },
                 ],
                },
                default: None,
               },
              },
              Binding {
               from: AttributePath {
                parts: [
                 Raw {
                  content: "metrics_endpoint",
                  position: (38, 9),
                 },
                ],
               },
               to: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (38, 28),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "metricsEndpoint",
                   position: (38, 32),
                  },
                 ],
                },
                default: None,
               },
              },
             ],
             recursive: false,
             position: (35, 16),
            },
           },
          ],
          recursive: false,
          position: (34, 20),
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "completeConfig",
            position: (41, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "pkgs",
            position: (41, 22),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "writeText",
              position: (41, 27),
             },
            ],
           },
           default: None,
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "nginxlog-exporter.yaml",
              position: (41, 38),
             },
            ],
            position: (41, 37),
           },
           Parentheses {
            expression: FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "builtins",
               position: (41, 63),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "toJSON",
                 position: (41, 72),
                },
               ],
              },
              default: None,
             },
             arguments: [
              Parentheses {
               expression: FunctionApplication {
                function: PropertyAccess {
                 expression: Variable {
                  identifier: "lib",
                  position: (41, 80),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "recursiveUpdate",
                    position: (41, 84),
                   },
                  ],
                 },
                 default: None,
                },
                arguments: [
                 Variable {
                  identifier: "listenConfig",
                  position: (41, 100),
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (41, 113),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "settings",
                     position: (41, 117),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
               position: (41, 79),
              },
             ],
            },
            position: (41, 62),
           },
          ],
         },
        },
       ],
       target: Map {
        bindings: [
         Binding {
          from: AttributePath {
           parts: [
            Raw {
             content: "serviceConfig",
             position: (43, 5),
            },
           ],
          },
          to: Map {
           bindings: [
            Binding {
             from: AttributePath {
              parts: [
               Raw {
                content: "ExecStart",
                position: (44, 7),
               },
              ],
             },
             to: String {
              parts: [
               Raw {
                content: "",
                position: (45, 1),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (45, 11),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "prometheus-nginxlog-exporter",
                    position: (45, 16),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "/bin/prometheus-nginxlog-exporter -config-file ",
                position: (45, 45),
               },
               Expression {
                expression: Variable {
                 identifier: "completeConfig",
                 position: (45, 94),
                },
               },
               Raw {
                content: "\n",
                position: (45, 109),
               },
              ],
              position: (44, 19),
             },
            },
            Binding {
             from: AttributePath {
              parts: [
               Raw {
                content: "Restart",
                position: (47, 7),
               },
              ],
             },
             to: String {
              parts: [
               Raw {
                content: "always",
                position: (47, 16),
               },
              ],
              position: (47, 15),
             },
            },
            Binding {
             from: AttributePath {
              parts: [
               Raw {
                content: "ProtectSystem",
                position: (48, 7),
               },
              ],
             },
             to: String {
              parts: [
               Raw {
                content: "full",
                position: (48, 22),
               },
              ],
              position: (48, 21),
             },
            },
           ],
           recursive: false,
           position: (43, 21),
          },
         },
        ],
        recursive: false,
        position: (42, 6),
       },
       position: (33, 17),
      },
     },
    ],
    recursive: false,
    position: (7, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}