---
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: "py-air-control",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "workingDir",
        position: (8, 3),
       },
      ],
     },
     String {
      parts: [
       Raw {
        content: "/var/lib/",
        position: (8, 17),
       },
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (8, 28),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "stateDir",
            position: (8, 32),
           },
          ],
         },
         default: None,
        },
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (12, 3),
        },
       ],
      },
      Int {
       value: 9896,
       position: (12, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (13, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "deviceHostname",
            position: (14, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (14, 22),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (15, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (15, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (15, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (16, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "192.168.1.123",
                 position: (16, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (17, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The hostname of the air purification device from which to scrape the metrics.\n",
                 position: (18, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (14, 31),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "protocol",
            position: (21, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (21, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (22, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (22, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (22, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (23, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "http",
                 position: (23, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (24, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The protocol to use when communicating with the air purification device.\nAvailable: [http, coap, plain_coap]\n",
                 position: (25, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (21, 25),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "stateDir",
            position: (29, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (29, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (30, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (30, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (30, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (31, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "prometheus-py-air-control-exporter",
                 position: (31, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (32, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Directory below <literal>/var/lib</literal> to store runtime data.\nThis directory will be created automatically using systemd's StateDirectory mechanism.\n",
                 position: (33, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (29, 25),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (13, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (38, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "serviceConfig",
            position: (39, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "DynamicUser",
               position: (40, 7),
              },
             ],
            },
            Variable {
             identifier: "false",
             position: (40, 21),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "StateDirectory",
               position: (41, 7),
              },
             ],
            },
            PropertyAccess {
             expression: Variable {
              identifier: "cfg",
              position: (41, 24),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "stateDir",
                position: (41, 28),
               },
              ],
             },
             default: None,
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "WorkingDirectory",
               position: (42, 7),
              },
             ],
            },
            Variable {
             identifier: "workingDir",
             position: (42, 26),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ExecStart",
               position: (43, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "",
               position: (44, 1),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (44, 11),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "python3Packages",
                   position: (44, 16),
                  },
                  Raw {
                   content: "py-air-control-exporter",
                   position: (44, 32),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: "/bin/py-air-control-exporter \\\n  --host ",
               position: (44, 56),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (45, 20),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "deviceHostname",
                   position: (45, 24),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: " \\\n  --protocol ",
               position: (45, 39),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (46, 24),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "protocol",
                   position: (46, 28),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: " \\\n  --listen-port ",
               position: (46, 37),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "toString",
                 position: (47, 27),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (47, 36),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "port",
                     position: (47, 40),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  --listen-address ",
               position: (47, 45),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (48, 30),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listenAddress",
                   position: (48, 34),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: "\n",
               position: (48, 48),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "Environment",
               position: (50, 7),
              },
             ],
            },
            List {
             elements: [
              String {
               parts: [
                Raw {
                 content: "HOME=",
                 position: (50, 24),
                },
                Expression {
                 expression: Variable {
                  identifier: "workingDir",
                  position: (50, 31),
                 },
                },
               ],
              },
             ],
             position: (50, 21),
            },
           ),
          ],
          recursive: false,
          position: (39, 21),
         },
        ),
       ],
       recursive: false,
       position: (38, 17),
      },
     ),
    ],
    recursive: false,
    position: (11, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}