---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 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: "grafana_reporter",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (9, 3),
        },
        Raw {
         content: "services",
         position: (9, 11),
        },
        Raw {
         content: "grafana_reporter",
         position: (9, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (10, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (10, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "grafana_reporter",
              position: (10, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "grafana",
            position: (12, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "protocol",
               position: (13, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (13, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (14, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Grafana protocol.",
                    position: (14, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (15, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "http",
                    position: (15, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (16, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (16, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "enum",
                      position: (16, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   List {
                    elements: [
                     String {
                      parts: [
                       Raw {
                        content: "http",
                        position: (16, 29),
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "https",
                        position: (16, 36),
                       },
                      ],
                     },
                    ],
                    position: (16, 27),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (13, 27),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "addr",
               position: (18, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (18, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (19, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Grafana address.",
                    position: (19, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (20, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "127.0.0.1",
                    position: (20, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (21, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (21, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (21, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (18, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (23, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (23, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (24, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Grafana port.",
                    position: (24, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (25, 9),
                   },
                  ],
                 },
                 Int {
                  value: 3000,
                  position: (25, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (26, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (26, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "int",
                     position: (26, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (23, 23),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (12, 15),
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "addr",
            position: (30, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (30, 12),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (31, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Listening address.",
                 position: (31, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (32, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "127.0.0.1",
                 position: (32, 18),
                },
               ],
              },
             ),
             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,
              },
             ),
            ],
            recursive: false,
            position: (30, 21),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "port",
            position: (36, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (36, 12),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (37, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Listening port.",
                 position: (37, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (38, 7),
                },
               ],
              },
              Int {
               value: 8686,
               position: (38, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (39, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (39, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "int",
                  position: (39, 20),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (36, 21),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "templateDir",
            position: (42, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (42, 19),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (43, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Optional template directory to use custom tex templates",
                 position: (43, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (44, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (44, 17),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "grafana_reporter",
                  position: (44, 22),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (45, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (45, 21),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "pkgs.grafana_reporter",
                   position: (45, 40),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (46, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (46, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "either",
                   position: (46, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (46, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (46, 33),
                   },
                  ],
                 },
                 default: None,
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (46, 37),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (46, 43),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (42, 28),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (9, 39),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (50, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (50, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (50, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (50, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (51, 5),
             },
             Raw {
              content: "services",
              position: (51, 13),
             },
             Raw {
              content: "grafana_reporter",
              position: (51, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (52, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Grafana Reporter Service Daemon",
                 position: (52, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (53, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (53, 20),
                  },
                 ],
                },
               ],
               position: (53, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (54, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (54, 17),
                  },
                 ],
                },
               ],
               position: (54, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (55, 7),
                },
               ],
              },
              LetIn {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "args",
                    position: (56, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "lib",
                    position: (56, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "concatStringsSep",
                      position: (56, 20),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: " ",
                      position: (56, 38),
                     },
                    ],
                   },
                   List {
                    elements: [
                     String {
                      parts: [
                       Raw {
                        content: "-proto ",
                        position: (57, 12),
                       },
                       Expression {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (57, 21),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "grafana",
                            position: (57, 25),
                           },
                           Raw {
                            content: "protocol",
                            position: (57, 33),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                       Raw {
                        content: "://",
                        position: (57, 42),
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "-ip ",
                        position: (58, 12),
                       },
                       Expression {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (58, 18),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "grafana",
                            position: (58, 22),
                           },
                           Raw {
                            content: "addr",
                            position: (58, 30),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                       Raw {
                        content: ":",
                        position: (58, 35),
                       },
                       Expression {
                        expression: FunctionApplication {
                         function: Variable {
                          identifier: "toString",
                          position: (58, 38),
                         },
                         arguments: [
                          PropertyAccess {
                           expression: Variable {
                            identifier: "cfg",
                            position: (58, 47),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "grafana",
                              position: (58, 51),
                             },
                             Raw {
                              content: "port",
                              position: (58, 59),
                             },
                            ],
                           },
                           default: None,
                          },
                         ],
                        },
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "-port :",
                        position: (59, 12),
                       },
                       Expression {
                        expression: FunctionApplication {
                         function: Variable {
                          identifier: "toString",
                          position: (59, 21),
                         },
                         arguments: [
                          PropertyAccess {
                           expression: Variable {
                            identifier: "cfg",
                            position: (59, 30),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "port",
                              position: (59, 34),
                             },
                            ],
                           },
                           default: None,
                          },
                         ],
                        },
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "-templates ",
                        position: (60, 12),
                       },
                       Expression {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (60, 25),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "templateDir",
                            position: (60, 29),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                      ],
                     },
                    ],
                    position: (56, 41),
                   },
                  ],
                 },
                ),
               ],
               target: Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "ExecStart",
                     position: (63, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "pkgs",
                       position: (63, 24),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "grafana_reporter",
                         position: (63, 29),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: "/bin/grafana-reporter ",
                     position: (63, 46),
                    },
                    Expression {
                     expression: Variable {
                      identifier: "args",
                      position: (63, 70),
                     },
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (62, 10),
               },
               position: (55, 23),
              },
             ),
            ],
            recursive: false,
            position: (51, 41),
           },
          ),
         ],
         recursive: false,
         position: (50, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (8, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}