---
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: "opentsdb",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "configFile",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (8, 16),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "writeText",
          position: (8, 21),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "opentsdb.conf",
          position: (8, 32),
         },
        ],
       },
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (8, 47),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "config",
           position: (8, 51),
          },
         ],
        },
        default: None,
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (14, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (16, 5),
           },
           Raw {
            content: "opentsdb",
            position: (16, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (18, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (18, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (19, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (19, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (19, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (20, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (20, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Whether to run OpenTSDB.\n",
                    position: (22, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (18, 25),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "package",
               position: (26, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (27, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (27, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "package",
                     position: (27, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (28, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (28, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "opentsdb",
                     position: (28, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (29, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (29, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.opentsdb",
                      position: (29, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (30, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "OpenTSDB package to use.\n",
                    position: (31, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (26, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "user",
               position: (35, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (35, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (36, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (36, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (36, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (37, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "opentsdb",
                    position: (37, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (38, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "User account under which OpenTSDB runs.\n",
                    position: (39, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (35, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "group",
               position: (43, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (43, 15),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (44, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (44, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (44, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (45, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "opentsdb",
                    position: (45, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (46, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Group account under which OpenTSDB runs.\n",
                    position: (47, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (43, 24),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (51, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (51, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (52, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (52, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "int",
                     position: (52, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (53, 9),
                   },
                  ],
                 },
                 Int {
                  value: 4242,
                  position: (53, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (54, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Which port OpenTSDB listens on.\n",
                    position: (55, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (51, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "config",
               position: (59, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (59, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (60, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (60, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "lines",
                     position: (60, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (61, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "tsd.core.auto_create_metrics = true\ntsd.http.request.enable_chunked  = true\n",
                    position: (62, 1),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (65, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The contents of OpenTSDB's configuration file\n",
                    position: (66, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (59, 25),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (16, 25),
         },
        ),
       ],
       recursive: false,
       position: (14, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (76, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (76, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "config",
          position: (76, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (76, 24),
           },
           Raw {
            content: "opentsdb",
            position: (76, 33),
           },
           Raw {
            content: "enable",
            position: (76, 42),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (78, 5),
             },
             Raw {
              content: "services",
              position: (78, 13),
             },
             Raw {
              content: "opentsdb",
              position: (78, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (79, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "OpenTSDB Server",
                 position: (79, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (80, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (80, 21),
                  },
                 ],
                },
               ],
               position: (80, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "requires",
                 position: (81, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "hbase.service",
                   position: (81, 21),
                  },
                 ],
                },
               ],
               position: (81, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "environment",
                 position: (83, 7),
                },
                Raw {
                 content: "JAVA_HOME",
                 position: (83, 19),
                },
               ],
              },
              String {
               parts: [
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (83, 34),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "jre",
                     position: (83, 39),
                    },
                   ],
                  },
                  default: None,
                 },
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (84, 7),
                },
               ],
              },
              List {
               elements: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (84, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "gnuplot",
                    position: (84, 21),
                   },
                  ],
                 },
                 default: None,
                },
               ],
               position: (84, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "preStart",
                 position: (86, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "COMPRESSION=NONE HBASE_HOME=",
                 position: (88, 1),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "config",
                   position: (88, 39),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "services",
                     position: (88, 46),
                    },
                    Raw {
                     content: "hbase",
                     position: (88, 55),
                    },
                    Raw {
                     content: "package",
                     position: (88, 61),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: " ",
                 position: (88, 69),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (88, 72),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "package",
                     position: (88, 76),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/share/opentsdb/tools/create_table.sh\n",
                 position: (88, 84),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (91, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PermissionsStartOnly",
                    position: (92, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (92, 32),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (93, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (93, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (93, 20),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (94, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (94, 17),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (94, 21),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (95, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (95, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (95, 28),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/tsdb tsd --staticroot=",
                    position: (95, 36),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (95, 65),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (95, 69),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/share/opentsdb/static --cachedir=/tmp/opentsdb --port=",
                    position: (95, 77),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: Variable {
                      identifier: "toString",
                      position: (95, 134),
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (95, 143),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "port",
                          position: (95, 147),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   },
                   Raw {
                    content: " --config=",
                    position: (95, 152),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "configFile",
                     position: (95, 164),
                    },
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (91, 23),
              },
             ),
            ],
            recursive: false,
            position: (78, 33),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (99, 5),
             },
             Raw {
              content: "users",
              position: (99, 11),
             },
             Raw {
              content: "opentsdb",
              position: (99, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (100, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "OpenTSDB Server user",
                 position: (100, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "group",
                 position: (101, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "opentsdb",
                 position: (101, 16),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "uid",
                 position: (102, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "config",
                position: (102, 13),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "ids",
                  position: (102, 20),
                 },
                 Raw {
                  content: "uids",
                  position: (102, 24),
                 },
                 Raw {
                  content: "opentsdb",
                  position: (102, 29),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (99, 28),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (105, 5),
             },
             Raw {
              content: "groups",
              position: (105, 11),
             },
             Raw {
              content: "opentsdb",
              position: (105, 18),
             },
             Raw {
              content: "gid",
              position: (105, 27),
             },
            ],
           },
           PropertyAccess {
            expression: Variable {
             identifier: "config",
             position: (105, 33),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "ids",
               position: (105, 40),
              },
              Raw {
               content: "gids",
               position: (105, 44),
              },
              Raw {
               content: "opentsdb",
               position: (105, 49),
              },
             ],
            },
            default: None,
           },
          ),
         ],
         recursive: false,
         position: (76, 49),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (10, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}