---
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: "nextcloud",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (9, 3),
        },
       ],
      },
      Int {
       value: 9205,
       position: (9, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (10, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "url",
            position: (11, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (11, 11),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (12, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (12, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (12, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (13, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "https://domain.tld",
                 position: (13, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (14, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "URL to the Nextcloud serverinfo page.\nAdding the path to the serverinfo API is optional, it defaults\nto <literal>/ocs/v2.php/apps/serverinfo/api/v1/info</literal>.\n",
                 position: (15, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (11, 20),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "username",
            position: (20, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (20, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (21, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (21, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (21, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (22, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "nextcloud-exporter",
                 position: (22, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (23, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Username for connecting to Nextcloud.\nNote that this account needs to have admin privileges in Nextcloud.\n",
                 position: (24, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (20, 25),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "passwordFile",
            position: (28, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (28, 20),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (29, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (29, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (29, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (30, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/path/to/password-file",
                 position: (30, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (31, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "File containing the password for connecting to Nextcloud.\nMake sure that this file is readable by the exporter user.\n",
                 position: (32, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (28, 29),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "timeout",
            position: (36, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (36, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (37, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (37, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (37, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (38, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "5s",
                 position: (38, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (39, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Timeout for getting server info document.\n",
                 position: (40, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (36, 24),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (10, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (44, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "serviceConfig",
            position: (45, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "DynamicUser",
               position: (46, 7),
              },
             ],
            },
            Variable {
             identifier: "false",
             position: (46, 21),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ExecStart",
               position: (47, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "",
               position: (48, 1),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (48, 11),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "prometheus-nextcloud-exporter",
                   position: (48, 16),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: "/bin/nextcloud-exporter \\\n  --addr ",
               position: (48, 46),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (49, 20),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listenAddress",
                   position: (49, 24),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: ":",
               position: (49, 38),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "toString",
                 position: (49, 41),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (49, 50),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "port",
                     position: (49, 54),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  --username ",
               position: (49, 59),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (50, 24),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "username",
                   position: (50, 28),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: " \\\n  --timeout ",
               position: (50, 37),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (51, 23),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "timeout",
                   position: (51, 27),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: " \\\n  --server ",
               position: (51, 35),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (52, 22),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "url",
                   position: (52, 26),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: " \\\n  --password ",
               position: (52, 30),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "escapeShellArg",
                 position: (53, 24),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: "@",
                    position: (53, 40),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (53, 43),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "passwordFile",
                        position: (53, 47),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                  ],
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  ",
               position: (53, 62),
              },
              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),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (45, 21),
         },
        ),
       ],
       recursive: false,
       position: (44, 17),
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}