---
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: "nginxlog",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (8, 3),
        },
       ],
      },
      Int {
       value: 9117,
       position: (8, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (9, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "settings",
            position: (10, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (10, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (11, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (11, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "attrs",
                  position: (11, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (12, 7),
                },
               ],
              },
              Map {
               bindings: [],
               recursive: false,
               position: (12, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (13, 7),
                },
               ],
              },
              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),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (10, 25),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "metricsEndpoint",
            position: (24, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (24, 23),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (25, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (25, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (25, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (26, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/metrics",
                 position: (26, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (27, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Path under which to expose metrics.\n",
                 position: (28, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (24, 32),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (9, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (33, 3),
        },
       ],
      },
      LetIn {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "listenConfig",
            position: (34, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "listen",
               position: (35, 7),
              },
             ],
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "port",
                  position: (36, 9),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (36, 16),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "port",
                   position: (36, 20),
                  },
                 ],
                },
                default: None,
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "address",
                  position: (37, 9),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (37, 19),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listenAddress",
                   position: (37, 23),
                  },
                 ],
                },
                default: None,
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "metrics_endpoint",
                  position: (38, 9),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (38, 28),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "metricsEndpoint",
                   position: (38, 32),
                  },
                 ],
                },
                default: None,
               },
              ),
             ],
             recursive: false,
             position: (35, 16),
            },
           ),
          ],
          recursive: false,
          position: (34, 20),
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "completeConfig",
            position: (41, 5),
           },
          ],
         },
         FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "pkgs",
            position: (41, 22),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "writeText",
              position: (41, 27),
             },
            ],
           },
           default: None,
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "nginxlog-exporter.yaml",
              position: (41, 38),
             },
            ],
           },
           FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "builtins",
              position: (41, 63),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "toJSON",
                position: (41, 72),
               },
              ],
             },
             default: None,
            },
            arguments: [
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "lib",
                position: (41, 80),
               },
               attribute_path: AttributePath {
                attributes: [
                 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 {
                 attributes: [
                  Raw {
                   content: "settings",
                   position: (41, 117),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ],
           },
          ],
         },
        ),
       ],
       target: Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "serviceConfig",
             position: (43, 5),
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "ExecStart",
                position: (44, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "",
                position: (45, 1),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (45, 11),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   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),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "Restart",
                position: (47, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "always",
                position: (47, 16),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "ProtectSystem",
                position: (48, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "full",
                position: (48, 22),
               },
              ],
             },
            ),
           ],
           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),
}