---
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: "script",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "configFile",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 16),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "writeText",
          position: (7, 21),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "script-exporter.yaml",
          position: (7, 32),
         },
        ],
       },
       FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "builtins",
          position: (7, 55),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "toJSON",
            position: (7, 64),
           },
          ],
         },
         default: None,
        },
        arguments: [
         PropertyAccess {
          expression: Variable {
           identifier: "cfg",
           position: (7, 71),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "settings",
             position: (7, 75),
            },
           ],
          },
          default: None,
         },
        ],
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (10, 3),
        },
       ],
      },
      Int {
       value: 9172,
       position: (10, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (11, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "settings",
            position: (12, 5),
           },
           Raw {
            content: "scripts",
            position: (12, 14),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (12, 24),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (13, 7),
                },
               ],
              },
              With {
               expression: Variable {
                identifier: "types",
                position: (13, 19),
               },
               target: FunctionApplication {
                function: Variable {
                 identifier: "listOf",
                 position: (13, 26),
                },
                arguments: [
                 FunctionApplication {
                  function: Variable {
                   identifier: "submodule",
                   position: (13, 34),
                  },
                  arguments: [
                   Map {
                    bindings: [
                     KeyValue(
                      AttributePath {
                       attributes: [
                        Raw {
                         content: "options",
                         position: (14, 9),
                        },
                       ],
                      },
                      Map {
                       bindings: [
                        KeyValue(
                         AttributePath {
                          attributes: [
                           Raw {
                            content: "name",
                            position: (15, 11),
                           },
                          ],
                         },
                         FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (15, 18),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "type",
                                 position: (16, 13),
                                },
                               ],
                              },
                              Variable {
                               identifier: "str",
                               position: (16, 20),
                              },
                             ),
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "example",
                                 position: (17, 13),
                                },
                               ],
                              },
                              String {
                               parts: [
                                Raw {
                                 content: "sleep",
                                 position: (17, 24),
                                },
                               ],
                              },
                             ),
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "description",
                                 position: (18, 13),
                                },
                               ],
                              },
                              String {
                               parts: [
                                Raw {
                                 content: "Name of the script.",
                                 position: (18, 28),
                                },
                               ],
                              },
                             ),
                            ],
                            recursive: false,
                            position: (15, 27),
                           },
                          ],
                         },
                        ),
                        KeyValue(
                         AttributePath {
                          attributes: [
                           Raw {
                            content: "script",
                            position: (20, 11),
                           },
                          ],
                         },
                         FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (20, 20),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "type",
                                 position: (21, 13),
                                },
                               ],
                              },
                              Variable {
                               identifier: "str",
                               position: (21, 20),
                              },
                             ),
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "example",
                                 position: (22, 13),
                                },
                               ],
                              },
                              String {
                               parts: [
                                Raw {
                                 content: "sleep 5",
                                 position: (22, 24),
                                },
                               ],
                              },
                             ),
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "description",
                                 position: (23, 13),
                                },
                               ],
                              },
                              String {
                               parts: [
                                Raw {
                                 content: "Shell script to execute when metrics are requested.",
                                 position: (23, 28),
                                },
                               ],
                              },
                             ),
                            ],
                            recursive: false,
                            position: (20, 29),
                           },
                          ],
                         },
                        ),
                        KeyValue(
                         AttributePath {
                          attributes: [
                           Raw {
                            content: "timeout",
                            position: (25, 11),
                           },
                          ],
                         },
                         FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (25, 21),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "type",
                                 position: (26, 13),
                                },
                               ],
                              },
                              FunctionApplication {
                               function: Variable {
                                identifier: "nullOr",
                                position: (26, 20),
                               },
                               arguments: [
                                Variable {
                                 identifier: "int",
                                 position: (26, 27),
                                },
                               ],
                              },
                             ),
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "default",
                                 position: (27, 13),
                                },
                               ],
                              },
                              Variable {
                               identifier: "null",
                               position: (27, 23),
                              },
                             ),
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "example",
                                 position: (28, 13),
                                },
                               ],
                              },
                              Int {
                               value: 60,
                               position: (28, 23),
                              },
                             ),
                             KeyValue(
                              AttributePath {
                               attributes: [
                                Raw {
                                 content: "description",
                                 position: (29, 13),
                                },
                               ],
                              },
                              String {
                               parts: [
                                Raw {
                                 content: "Optional timeout for the script in seconds.",
                                 position: (29, 28),
                                },
                               ],
                              },
                             ),
                            ],
                            recursive: false,
                            position: (25, 30),
                           },
                          ],
                         },
                        ),
                       ],
                       recursive: false,
                       position: (14, 19),
                      },
                     ),
                    ],
                    recursive: false,
                    position: (13, 44),
                   },
                  ],
                 },
                ],
               },
               position: (13, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (33, 7),
                },
               ],
              },
              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),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (40, 7),
                },
               ],
              },
              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),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (12, 33),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (11, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (48, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "serviceConfig",
            position: (49, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ExecStart",
               position: (50, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "",
               position: (51, 1),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (51, 11),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "prometheus-script-exporter",
                   position: (51, 16),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: "/bin/script_exporter \\\n  --web.listen-address ",
               position: (51, 43),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (52, 34),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listenAddress",
                   position: (52, 38),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: ":",
               position: (52, 52),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "toString",
                 position: (52, 55),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (52, 64),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "port",
                     position: (52, 68),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  --config.file ",
               position: (52, 73),
              },
              Expression {
               expression: Variable {
                identifier: "configFile",
                position: (53, 27),
               },
              },
              Raw {
               content: " \\\n  ",
               position: (53, 38),
              },
              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),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "NoNewPrivileges",
               position: (56, 7),
              },
             ],
            },
            Variable {
             identifier: "true",
             position: (56, 25),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ProtectHome",
               position: (57, 7),
              },
             ],
            },
            Variable {
             identifier: "true",
             position: (57, 21),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ProtectSystem",
               position: (58, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "strict",
               position: (58, 24),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ProtectKernelTunables",
               position: (59, 7),
              },
             ],
            },
            Variable {
             identifier: "true",
             position: (59, 31),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ProtectKernelModules",
               position: (60, 7),
              },
             ],
            },
            Variable {
             identifier: "true",
             position: (60, 30),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ProtectControlGroups",
               position: (61, 7),
              },
             ],
            },
            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),
}