---
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: "snmp",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (9, 3),
        },
       ],
      },
      Int {
       value: 9116,
       position: (9, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (10, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "configurationPath",
            position: (11, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (11, 25),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (12, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (12, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "nullOr",
                   position: (12, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (12, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (12, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (13, 7),
                },
               ],
              },
              Variable {
               identifier: "null",
               position: (13, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (14, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Path to a snmp exporter configuration file. Mutually exclusive with 'configuration' option.\n",
                 position: (15, 1),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (17, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (17, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "./snmp.yml",
                   position: (17, 36),
                  },
                 ],
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (11, 34),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "configuration",
            position: (20, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (20, 21),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (21, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (21, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "nullOr",
                   position: (21, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (21, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "attrs",
                    position: (21, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (22, 7),
                },
               ],
              },
              Variable {
               identifier: "null",
               position: (22, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (23, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Snmp exporter configuration as nix attribute set. Mutually exclusive with 'configurationPath' option.\n",
                 position: (24, 1),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (26, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Expression {
                    expression: String {
                     parts: [
                      Raw {
                       content: "default",
                       position: (27, 10),
                      },
                     ],
                    },
                   },
                  ],
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Expression {
                       expression: String {
                        parts: [
                         Raw {
                          content: "version",
                          position: (28, 12),
                         },
                        ],
                       },
                      },
                     ],
                    },
                    Int {
                     value: 2,
                     position: (28, 23),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Expression {
                       expression: String {
                        parts: [
                         Raw {
                          content: "auth",
                          position: (29, 12),
                         },
                        ],
                       },
                      },
                     ],
                    },
                    Map {
                     bindings: [
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Expression {
                          expression: String {
                           parts: [
                            Raw {
                             content: "community",
                             position: (30, 14),
                            },
                           ],
                          },
                         },
                        ],
                       },
                       String {
                        parts: [
                         Raw {
                          content: "public",
                          position: (30, 28),
                         },
                        ],
                       },
                      ),
                     ],
                     recursive: false,
                     position: (29, 20),
                    },
                   ),
                  ],
                  recursive: false,
                  position: (27, 21),
                 },
                ),
               ],
               recursive: false,
               position: (26, 17),
              },
             ),
            ],
            recursive: false,
            position: (20, 30),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "logFormat",
            position: (36, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (36, 17),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (37, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (37, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "enum",
                   position: (37, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                List {
                 elements: [
                  String {
                   parts: [
                    Raw {
                     content: "logfmt",
                     position: (37, 27),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "json",
                     position: (37, 36),
                    },
                   ],
                  },
                 ],
                 position: (37, 25),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (38, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "logfmt",
                 position: (38, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (39, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Output format of log messages.\n",
                 position: (40, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (36, 26),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "logLevel",
            position: (44, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (44, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (45, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (45, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "enum",
                   position: (45, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                List {
                 elements: [
                  String {
                   parts: [
                    Raw {
                     content: "debug",
                     position: (45, 27),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "info",
                     position: (45, 35),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "warn",
                     position: (45, 42),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "error",
                     position: (45, 49),
                    },
                   ],
                  },
                 ],
                 position: (45, 25),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (46, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "info",
                 position: (46, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (47, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Only log messages with the given severity or above.\n",
                 position: (48, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (44, 25),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (10, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (52, 3),
        },
       ],
      },
      LetIn {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "configFile",
            position: (53, 5),
           },
          ],
         },
         IfThenElse {
          predicate: BinaryOperation {
           operator: NotEqualTo,
           operands: [
            PropertyAccess {
             expression: Variable {
              identifier: "cfg",
              position: (53, 21),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "configurationPath",
                position: (53, 25),
               },
              ],
             },
             default: None,
            },
            Variable {
             identifier: "null",
             position: (53, 46),
            },
           ],
           position: (53, 43),
          },
          then: PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (54, 23),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "configurationPath",
              position: (54, 27),
             },
            ],
           },
           default: None,
          },
          else_: String {
           parts: [
            Expression {
             expression: FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (55, 26),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "writeText",
                  position: (55, 31),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               String {
                parts: [
                 Raw {
                  content: "snmp-exporter-conf.yml",
                  position: (55, 42),
                 },
                ],
               },
               FunctionApplication {
                function: PropertyAccess {
                 expression: Variable {
                  identifier: "builtins",
                  position: (55, 67),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "toJSON",
                    position: (55, 76),
                   },
                  ],
                 },
                 default: None,
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (55, 83),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "configuration",
                     position: (55, 87),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              ],
             },
            },
           ],
          },
          position: (53, 18),
         },
        ),
       ],
       target: Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "serviceConfig",
             position: (57, 5),
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "ExecStart",
                position: (58, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "",
                position: (59, 1),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (59, 11),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "prometheus-snmp-exporter",
                    position: (59, 16),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "/bin/snmp_exporter \\\n  --config.file=",
                position: (59, 41),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "escapeShellArg",
                  position: (60, 27),
                 },
                 arguments: [
                  Variable {
                   identifier: "configFile",
                   position: (60, 42),
                  },
                 ],
                },
               },
               Raw {
                content: " \\\n  --log.format=",
                position: (60, 53),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "escapeShellArg",
                  position: (61, 26),
                 },
                 arguments: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (61, 41),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "logFormat",
                      position: (61, 45),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               },
               Raw {
                content: " \\\n  --log.level=",
                position: (61, 55),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (62, 25),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "logLevel",
                    position: (62, 29),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " \\\n  --web.listen-address=",
                position: (62, 38),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (63, 34),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "listenAddress",
                    position: (63, 38),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: ":",
                position: (63, 52),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (63, 55),
                 },
                 arguments: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (63, 64),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "port",
                      position: (63, 68),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               },
               Raw {
                content: " \\\n  ",
                position: (63, 73),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "concatStringsSep",
                  position: (64, 13),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: " \\\n  ",
                     position: (64, 31),
                    },
                   ],
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (64, 40),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "extraFlags",
                      position: (64, 44),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               },
               Raw {
                content: "\n",
                position: (64, 55),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (57, 21),
          },
         ),
        ],
        recursive: false,
        position: (56, 8),
       },
       position: (52, 17),
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}