---
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: "script",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "configFile",
        position: (7, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 16),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "writeText",
          position: (7, 21),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "script-exporter.yaml",
          position: (7, 32),
         },
        ],
        position: (7, 31),
       },
       Parentheses {
        expression: FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "builtins",
           position: (7, 55),
          },
          attribute_path: AttributePath {
           parts: [
            Raw {
             content: "toJSON",
             position: (7, 64),
            },
           ],
          },
          default: None,
         },
         arguments: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (7, 71),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "settings",
              position: (7, 75),
             },
            ],
           },
           default: None,
          },
         ],
        },
        position: (7, 54),
       },
      ],
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "port",
         position: (10, 3),
        },
       ],
      },
      to: Int {
       value: 9172,
       position: (10, 10),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "extraOpts",
         position: (11, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "settings",
            position: (12, 5),
           },
           Raw {
            content: "scripts",
            position: (12, 14),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (12, 24),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (13, 7),
                },
               ],
              },
              to: With {
               expression: Variable {
                identifier: "types",
                position: (13, 19),
               },
               target: FunctionApplication {
                function: Variable {
                 identifier: "listOf",
                 position: (13, 26),
                },
                arguments: [
                 Parentheses {
                  expression: FunctionApplication {
                   function: Variable {
                    identifier: "submodule",
                    position: (13, 34),
                   },
                   arguments: [
                    Map {
                     bindings: [
                      Binding {
                       from: AttributePath {
                        parts: [
                         Raw {
                          content: "options",
                          position: (14, 9),
                         },
                        ],
                       },
                       to: Map {
                        bindings: [
                         Binding {
                          from: AttributePath {
                           parts: [
                            Raw {
                             content: "name",
                             position: (15, 11),
                            },
                           ],
                          },
                          to: FunctionApplication {
                           function: Variable {
                            identifier: "mkOption",
                            position: (15, 18),
                           },
                           arguments: [
                            Map {
                             bindings: [
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "type",
                                  position: (16, 13),
                                 },
                                ],
                               },
                               to: Variable {
                                identifier: "str",
                                position: (16, 20),
                               },
                              },
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "example",
                                  position: (17, 13),
                                 },
                                ],
                               },
                               to: String {
                                parts: [
                                 Raw {
                                  content: "sleep",
                                  position: (17, 24),
                                 },
                                ],
                                position: (17, 23),
                               },
                              },
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "description",
                                  position: (18, 13),
                                 },
                                ],
                               },
                               to: String {
                                parts: [
                                 Raw {
                                  content: "Name of the script.",
                                  position: (18, 28),
                                 },
                                ],
                                position: (18, 27),
                               },
                              },
                             ],
                             recursive: false,
                             position: (15, 27),
                            },
                           ],
                          },
                         },
                         Binding {
                          from: AttributePath {
                           parts: [
                            Raw {
                             content: "script",
                             position: (20, 11),
                            },
                           ],
                          },
                          to: FunctionApplication {
                           function: Variable {
                            identifier: "mkOption",
                            position: (20, 20),
                           },
                           arguments: [
                            Map {
                             bindings: [
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "type",
                                  position: (21, 13),
                                 },
                                ],
                               },
                               to: Variable {
                                identifier: "str",
                                position: (21, 20),
                               },
                              },
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "example",
                                  position: (22, 13),
                                 },
                                ],
                               },
                               to: String {
                                parts: [
                                 Raw {
                                  content: "sleep 5",
                                  position: (22, 24),
                                 },
                                ],
                                position: (22, 23),
                               },
                              },
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "description",
                                  position: (23, 13),
                                 },
                                ],
                               },
                               to: String {
                                parts: [
                                 Raw {
                                  content: "Shell script to execute when metrics are requested.",
                                  position: (23, 28),
                                 },
                                ],
                                position: (23, 27),
                               },
                              },
                             ],
                             recursive: false,
                             position: (20, 29),
                            },
                           ],
                          },
                         },
                         Binding {
                          from: AttributePath {
                           parts: [
                            Raw {
                             content: "timeout",
                             position: (25, 11),
                            },
                           ],
                          },
                          to: FunctionApplication {
                           function: Variable {
                            identifier: "mkOption",
                            position: (25, 21),
                           },
                           arguments: [
                            Map {
                             bindings: [
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "type",
                                  position: (26, 13),
                                 },
                                ],
                               },
                               to: FunctionApplication {
                                function: Variable {
                                 identifier: "nullOr",
                                 position: (26, 20),
                                },
                                arguments: [
                                 Variable {
                                  identifier: "int",
                                  position: (26, 27),
                                 },
                                ],
                               },
                              },
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "default",
                                  position: (27, 13),
                                 },
                                ],
                               },
                               to: Variable {
                                identifier: "null",
                                position: (27, 23),
                               },
                              },
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "example",
                                  position: (28, 13),
                                 },
                                ],
                               },
                               to: Int {
                                value: 60,
                                position: (28, 23),
                               },
                              },
                              Binding {
                               from: AttributePath {
                                parts: [
                                 Raw {
                                  content: "description",
                                  position: (29, 13),
                                 },
                                ],
                               },
                               to: String {
                                parts: [
                                 Raw {
                                  content: "Optional timeout for the script in seconds.",
                                  position: (29, 28),
                                 },
                                ],
                                position: (29, 27),
                               },
                              },
                             ],
                             recursive: false,
                             position: (25, 30),
                            },
                           ],
                          },
                         },
                        ],
                        recursive: false,
                        position: (14, 19),
                       },
                      },
                     ],
                     recursive: false,
                     position: (13, 44),
                    },
                   ],
                  },
                  position: (13, 33),
                 },
                ],
               },
               position: (13, 14),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "example",
                 position: (33, 7),
                },
               ],
              },
              to: FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (33, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "{\n  scripts = [\n    { name = \"sleep\"; script = \"sleep 5\"; }\n  ];\n}\n",
                   position: (34, 1),
                  },
                 ],
                 position: (33, 35),
                },
               ],
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (40, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "All settings expressed as an Nix attrset.\n\nCheck the official documentation for the corresponding YAML\nsettings that can all be used here: <link xlink:href=\"https://github.com/adhocteam/script_exporter#sample-configuration\" />\n",
                 position: (41, 1),
                },
               ],
               position: (40, 21),
              },
             },
            ],
            recursive: false,
            position: (12, 33),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (11, 15),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "serviceOpts",
         position: (48, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "serviceConfig",
            position: (49, 5),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ExecStart",
               position: (50, 7),
              },
             ],
            },
            to: String {
             parts: [
              Raw {
               content: "",
               position: (51, 1),
              },
              Interpolation {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (51, 11),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "prometheus-script-exporter",
                   position: (51, 16),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: "/bin/script_exporter \\\n  --web.listen-address ",
               position: (51, 43),
              },
              Interpolation {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (52, 34),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "listenAddress",
                   position: (52, 38),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: ":",
               position: (52, 52),
              },
              Interpolation {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "toString",
                 position: (52, 55),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (52, 64),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "port",
                     position: (52, 68),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  --config.file ",
               position: (52, 73),
              },
              Interpolation {
               expression: Variable {
                identifier: "configFile",
                position: (53, 27),
               },
              },
              Raw {
               content: " \\\n  ",
               position: (53, 38),
              },
              Interpolation {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "concatStringsSep",
                 position: (54, 13),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: " \\\n  ",
                    position: (54, 31),
                   },
                  ],
                  position: (54, 30),
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (54, 40),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "extraFlags",
                     position: (54, 44),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: "\n",
               position: (54, 55),
              },
             ],
             position: (50, 19),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "NoNewPrivileges",
               position: (56, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (56, 25),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectHome",
               position: (57, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (57, 21),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectSystem",
               position: (58, 7),
              },
             ],
            },
            to: String {
             parts: [
              Raw {
               content: "strict",
               position: (58, 24),
              },
             ],
             position: (58, 23),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectKernelTunables",
               position: (59, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (59, 31),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectKernelModules",
               position: (60, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (60, 30),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectControlGroups",
               position: (61, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (61, 30),
            },
           },
          ],
          recursive: false,
          position: (49, 21),
         },
        },
       ],
       recursive: false,
       position: (48, 17),
      },
     },
    ],
    recursive: false,
    position: (9, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}