---
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: "smartctl",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "format",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 12),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "formats",
          position: (7, 17),
         },
         Raw {
          content: "yaml",
          position: (7, 25),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [],
        recursive: false,
        position: (7, 30),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "configFile",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "format",
        position: (8, 16),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "generate",
          position: (8, 23),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "smartctl-exporter.yml",
          position: (8, 33),
         },
        ],
       },
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "smartctl_exporter",
             position: (9, 5),
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "bind_to",
                position: (10, 7),
               },
              ],
             },
             String {
              parts: [
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (10, 20),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "listenAddress",
                    position: (10, 24),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: ":",
                position: (10, 38),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (10, 41),
                 },
                 arguments: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (10, 50),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "port",
                      position: (10, 54),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "url_path",
                position: (11, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "/metrics",
                position: (11, 19),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "smartctl_location",
                position: (12, 7),
               },
              ],
             },
             String {
              parts: [
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (12, 30),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "smartmontools",
                    position: (12, 35),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "/bin/smartctl",
                position: (12, 49),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "collect_not_more_than_period",
                position: (13, 7),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (13, 38),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "maxInterval",
                 position: (13, 42),
                },
               ],
              },
              default: None,
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "devices",
                position: (14, 7),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (14, 17),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "devices",
                 position: (14, 21),
                },
               ],
              },
              default: None,
             },
            ),
           ],
           recursive: false,
           position: (9, 25),
          },
         ),
        ],
        recursive: false,
        position: (8, 56),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (18, 3),
        },
       ],
      },
      Int {
       value: 9633,
       position: (18, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (20, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "devices",
            position: (21, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (21, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (22, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (22, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listOf",
                   position: (22, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (22, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (22, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (23, 7),
                },
               ],
              },
              List {
               elements: [],
               position: (23, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (24, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (24, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "[ \"/dev/sda\", \"/dev/nvme0n1\" ];\n",
                   position: (25, 1),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (27, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Paths to the disks that will be monitored. Will autodiscover\nall disks if none given.\n",
                 position: (28, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (21, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "maxInterval",
            position: (32, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (32, 19),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (33, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (33, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (33, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (34, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "60s",
                 position: (34, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (35, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "2m",
                 position: (35, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (36, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Interval that limits how often a disk can be queried.\n",
                 position: (37, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (32, 28),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (20, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (42, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "serviceConfig",
            position: (43, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "AmbientCapabilities",
               position: (44, 7),
              },
             ],
            },
            List {
             elements: [
              String {
               parts: [
                Raw {
                 content: "CAP_SYS_RAWIO",
                 position: (45, 10),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "CAP_SYS_ADMIN",
                 position: (46, 10),
                },
               ],
              },
             ],
             position: (44, 29),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "CapabilityBoundingSet",
               position: (48, 7),
              },
             ],
            },
            List {
             elements: [
              String {
               parts: [
                Raw {
                 content: "CAP_SYS_RAWIO",
                 position: (49, 10),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "CAP_SYS_ADMIN",
                 position: (50, 10),
                },
               ],
              },
             ],
             position: (48, 31),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "DevicePolicy",
               position: (52, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "closed",
               position: (52, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "DeviceAllow",
               position: (53, 7),
              },
             ],
            },
            FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "lib",
               position: (53, 21),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "mkOverride",
                 position: (53, 25),
                },
               ],
              },
              default: None,
             },
             arguments: [
              Int {
               value: 100,
               position: (53, 36),
              },
              IfThenElse {
               predicate: BinaryOperation {
                operator: NotEqualTo,
                operands: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (54, 12),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "devices",
                     position: (54, 16),
                    },
                   ],
                  },
                  default: None,
                 },
                 List {
                  elements: [],
                  position: (54, 27),
                 },
                ],
                position: (54, 24),
               },
               then: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (55, 11),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "devices",
                   position: (55, 15),
                  },
                 ],
                },
                default: None,
               },
               else_: List {
                elements: [
                 String {
                  parts: [
                   Raw {
                    content: "block-blkext rw",
                    position: (57, 12),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "block-sd rw",
                    position: (58, 12),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "char-nvme rw",
                    position: (59, 12),
                   },
                  ],
                 },
                ],
                position: (56, 14),
               },
               position: (54, 9),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ExecStart",
               position: (62, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "",
               position: (63, 1),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (63, 11),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "prometheus-smartctl-exporter",
                   position: (63, 16),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: "/bin/smartctl_exporter -config ",
               position: (63, 45),
              },
              Expression {
               expression: Variable {
                identifier: "configFile",
                position: (63, 78),
               },
              },
              Raw {
               content: "\n",
               position: (63, 89),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "PrivateDevices",
               position: (65, 7),
              },
             ],
            },
            FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "lib",
               position: (65, 24),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "mkForce",
                 position: (65, 28),
                },
               ],
              },
              default: None,
             },
             arguments: [
              Variable {
               identifier: "false",
               position: (65, 36),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ProtectProc",
               position: (66, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "invisible",
               position: (66, 22),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ProcSubset",
               position: (67, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "pid",
               position: (67, 21),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "SupplementaryGroups",
               position: (68, 7),
              },
             ],
            },
            List {
             elements: [
              String {
               parts: [
                Raw {
                 content: "disk",
                 position: (68, 32),
                },
               ],
              },
             ],
             position: (68, 29),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "SystemCallFilter",
               position: (69, 7),
              },
             ],
            },
            List {
             elements: [
              String {
               parts: [
                Raw {
                 content: "@system-service",
                 position: (70, 10),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "~@privileged @resources",
                 position: (71, 10),
                },
               ],
              },
             ],
             position: (69, 26),
            },
           ),
          ],
          recursive: false,
          position: (43, 21),
         },
        ),
       ],
       recursive: false,
       position: (42, 17),
      },
     ),
    ],
    recursive: false,
    position: (17, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}