---
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: "process",
         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: "process-exporter.yaml",
          position: (7, 32),
         },
        ],
        position: (7, 31),
       },
       Parentheses {
        expression: FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "builtins",
           position: (7, 56),
          },
          attribute_path: AttributePath {
           parts: [
            Raw {
             content: "toJSON",
             position: (7, 65),
            },
           ],
          },
          default: None,
         },
         arguments: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (7, 72),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "settings",
              position: (7, 76),
             },
            ],
           },
           default: None,
          },
         ],
        },
        position: (7, 55),
       },
      ],
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "port",
         position: (10, 3),
        },
       ],
      },
      to: Int {
       value: 9256,
       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: "process_names",
            position: (12, 14),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (12, 30),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (13, 7),
                },
               ],
              },
              to: FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (13, 14),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "listOf",
                   position: (13, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (13, 27),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "anything",
                    position: (13, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (14, 7),
                },
               ],
              },
              to: List {
               elements: [],
               position: (14, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "example",
                 position: (15, 7),
                },
               ],
              },
              to: FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (15, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "[\n  # Remove nix store path from process name\n  { name = \"{{.Matches.Wrapped}} {{ .Matches.Args }}\"; cmdline = [ \"^/nix/store[^ ]*/(?P<Wrapped>[^ /]*) (?P<Args>.*)\" ]; }\n]\n",
                   position: (16, 1),
                  },
                 ],
                 position: (15, 35),
                },
               ],
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (21, 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/ncabatoff/process-exporter\" />\n",
                 position: (22, 1),
                },
               ],
               position: (21, 21),
              },
             },
            ],
            recursive: false,
            position: (12, 39),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (11, 15),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "serviceOpts",
         position: (29, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "serviceConfig",
            position: (30, 5),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "DynamicUser",
               position: (31, 7),
              },
             ],
            },
            to: Variable {
             identifier: "false",
             position: (31, 21),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ExecStart",
               position: (32, 7),
              },
             ],
            },
            to: String {
             parts: [
              Raw {
               content: "",
               position: (33, 1),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (33, 11),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "prometheus-process-exporter",
                   position: (33, 16),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: "/bin/process-exporter \\\n  --web.listen-address ",
               position: (33, 44),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (34, 34),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "listenAddress",
                   position: (34, 38),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: ":",
               position: (34, 52),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "toString",
                 position: (34, 55),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (34, 64),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "port",
                     position: (34, 68),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  --config.path ",
               position: (34, 73),
              },
              Expression {
               expression: Variable {
                identifier: "configFile",
                position: (35, 27),
               },
              },
              Raw {
               content: " \\\n  ",
               position: (35, 38),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "concatStringsSep",
                 position: (36, 13),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: " \\\n  ",
                    position: (36, 31),
                   },
                  ],
                  position: (36, 30),
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (36, 40),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "extraFlags",
                     position: (36, 44),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: "\n",
               position: (36, 55),
              },
             ],
             position: (32, 19),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "NoNewPrivileges",
               position: (38, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (38, 25),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectHome",
               position: (39, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (39, 21),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectSystem",
               position: (40, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (40, 23),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectKernelTunables",
               position: (41, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (41, 31),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectKernelModules",
               position: (42, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (42, 30),
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ProtectControlGroups",
               position: (43, 7),
              },
             ],
            },
            to: Variable {
             identifier: "true",
             position: (43, 30),
            },
           },
          ],
          recursive: false,
          position: (30, 21),
         },
        },
       ],
       recursive: false,
       position: (29, 17),
      },
     },
    ],
    recursive: false,
    position: (9, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}