---
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: "kapacitor",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "kapacitorConf",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (8, 19),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "writeTextFile",
          position: (8, 24),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "name",
             position: (9, 5),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: "kapacitord.conf",
             position: (9, 13),
            },
           ],
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "text",
             position: (10, 5),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: "hostname=\"",
             position: (11, 1),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "config",
               position: (11, 19),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "networking",
                 position: (11, 26),
                },
                Raw {
                 content: "hostName",
                 position: (11, 37),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: "\"\ndata_dir=\"",
             position: (11, 46),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (12, 19),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "dataDir",
                 position: (12, 23),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: "\"\n\n[http]\n  bind-address = \"",
             position: (12, 31),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (15, 27),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "bind",
                 position: (15, 31),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: ":",
             position: (15, 36),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "toString",
               position: (15, 39),
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (15, 48),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "port",
                   position: (15, 52),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            },
            Raw {
             content: "\"\n  log-enabled = false\n  auth-enabled = false\n\n[task]\n  dir = \"",
             position: (15, 57),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (20, 18),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "dataDir",
                 position: (20, 22),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: "/tasks\"\n  snapshot-interval = \"",
             position: (20, 30),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (21, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "taskSnapshotInterval",
                 position: (21, 36),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: "\"\n\n[replay]\n  dir = \"",
             position: (21, 57),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (24, 18),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "dataDir",
                 position: (24, 22),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: "/replay\"\n\n[storage]\n  boltdb = \"",
             position: (24, 30),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (27, 21),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "dataDir",
                 position: (27, 25),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: "/kapacitor.db\"\n\n",
             position: (27, 33),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "optionalString",
               position: (29, 9),
              },
              arguments: [
               BinaryOperation {
                operator: NotEqualTo,
                operands: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (29, 25),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "loadDirectory",
                     position: (29, 29),
                    },
                   ],
                  },
                  default: None,
                 },
                 Variable {
                  identifier: "null",
                  position: (29, 46),
                 },
                ],
                position: (29, 43),
               },
               String {
                parts: [
                 Raw {
                  content: "[load]\n  enabled = true\n  dir = \"",
                  position: (30, 1),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (32, 20),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "loadDirectory",
                      position: (32, 24),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "\"\n",
                  position: (32, 38),
                 },
                ],
               },
              ],
             },
            },
            Raw {
             content: "\n\n",
             position: (33, 10),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "optionalString",
               position: (35, 9),
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (35, 25),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "defaultDatabase",
                   position: (35, 29),
                  },
                  Raw {
                   content: "enable",
                   position: (35, 45),
                  },
                 ],
                },
                default: None,
               },
               String {
                parts: [
                 Raw {
                  content: "[[influxdb]]\n  name = \"default\"\n  enabled = true\n  default = true\n  urls = [ \"",
                  position: (36, 1),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (40, 23),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "defaultDatabase",
                      position: (40, 27),
                     },
                     Raw {
                      content: "url",
                      position: (40, 43),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "\" ]\n  username = \"",
                  position: (40, 47),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (41, 25),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "defaultDatabase",
                      position: (41, 29),
                     },
                     Raw {
                      content: "username",
                      position: (41, 45),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "\"\n  password = \"",
                  position: (41, 54),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (42, 25),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "defaultDatabase",
                      position: (42, 29),
                     },
                     Raw {
                      content: "password",
                      position: (42, 45),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "\"\n",
                  position: (42, 54),
                 },
                ],
               },
              ],
             },
            },
            Raw {
             content: "\n\n",
             position: (43, 10),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "optionalString",
               position: (45, 9),
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (45, 25),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "alerta",
                   position: (45, 29),
                  },
                  Raw {
                   content: "enable",
                   position: (45, 36),
                  },
                 ],
                },
                default: None,
               },
               String {
                parts: [
                 Raw {
                  content: "[alerta]\n  enabled = true\n  url = \"",
                  position: (46, 1),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (48, 20),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "alerta",
                      position: (48, 24),
                     },
                     Raw {
                      content: "url",
                      position: (48, 31),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "\"\n  token = \"",
                  position: (48, 35),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (49, 22),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "alerta",
                      position: (49, 26),
                     },
                     Raw {
                      content: "token",
                      position: (49, 33),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "\"\n  environment = \"",
                  position: (49, 39),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (50, 28),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "alerta",
                      position: (50, 32),
                     },
                     Raw {
                      content: "environment",
                      position: (50, 39),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "\"\n  origin = \"",
                  position: (50, 51),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (51, 23),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "alerta",
                      position: (51, 27),
                     },
                     Raw {
                      content: "origin",
                      position: (51, 34),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "\"\n",
                  position: (51, 41),
                 },
                ],
               },
              ],
             },
            },
            Raw {
             content: "\n\n",
             position: (52, 10),
            },
            Expression {
             expression: PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (54, 9),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "extraConfig",
                 position: (54, 13),
                },
               ],
              },
              default: None,
             },
            },
            Raw {
             content: "\n",
             position: (54, 25),
            },
           ],
          },
         ),
        ],
        recursive: false,
        position: (8, 38),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (59, 3),
        },
        Raw {
         content: "services",
         position: (59, 11),
        },
        Raw {
         content: "kapacitor",
         position: (59, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (60, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (60, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "kapacitor",
              position: (60, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "dataDir",
            position: (62, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (62, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (63, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (63, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (63, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (64, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/var/lib/kapacitor",
                 position: (64, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (65, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Location where Kapacitor stores its state",
                 position: (65, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (62, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "port",
            position: (68, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (68, 12),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (69, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (69, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "int",
                  position: (69, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (70, 7),
                },
               ],
              },
              Int {
               value: 9092,
               position: (70, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (71, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Port of Kapacitor",
                 position: (71, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (68, 21),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "bind",
            position: (74, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (74, 12),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (75, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (75, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (75, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (76, 7),
                },
               ],
              },
              String {
               parts: [],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (77, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "0.0.0.0",
                 position: (77, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (78, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Address to bind to. The default is to bind to all addresses",
                 position: (78, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (74, 21),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "extraConfig",
            position: (81, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (81, 19),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (82, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "These lines go into kapacitord.conf verbatim.",
                 position: (82, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (83, 7),
                },
               ],
              },
              String {
               parts: [],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (84, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (84, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "lines",
                  position: (84, 20),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (81, 28),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "user",
            position: (87, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (87, 12),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (88, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (88, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (88, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (89, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "kapacitor",
                 position: (89, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (90, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "User account under which Kapacitor runs",
                 position: (90, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (87, 21),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "group",
            position: (93, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (93, 13),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (94, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (94, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (94, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (95, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "kapacitor",
                 position: (95, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (96, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Group under which Kapacitor runs",
                 position: (96, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (93, 22),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "taskSnapshotInterval",
            position: (99, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (99, 28),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (100, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (100, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (100, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (101, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Specifies how often to snapshot the task state  (in InfluxDB time units)",
                 position: (101, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (102, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "1m0s",
                 position: (102, 18),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (99, 37),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "loadDirectory",
            position: (105, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (105, 21),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (106, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (106, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "nullOr",
                   position: (106, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (106, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (106, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (107, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Directory where to load services from, such as tasks, templates and handlers (or null to disable service loading on startup)",
                 position: (107, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (108, 7),
                },
               ],
              },
              Variable {
               identifier: "null",
               position: (108, 17),
              },
             ),
            ],
            recursive: false,
            position: (105, 30),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "defaultDatabase",
            position: (111, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (112, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (112, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "kapacitor.defaultDatabase",
                 position: (112, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "url",
               position: (114, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (114, 13),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (115, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The URL to an InfluxDB server that serves as the default database",
                    position: (115, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (116, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "http://localhost:8086",
                    position: (116, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (117, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (117, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (117, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (114, 22),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "username",
               position: (120, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (120, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (121, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The username to connect to the remote InfluxDB server",
                    position: (121, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (122, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (122, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (122, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (120, 27),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "password",
               position: (125, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (125, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (126, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The password to connect to the remote InfluxDB server",
                    position: (126, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (127, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (127, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (127, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (125, 27),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (111, 23),
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "alerta",
            position: (131, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (132, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (132, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "kapacitor alerta integration",
                 position: (132, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "url",
               position: (134, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (134, 13),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (135, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The URL to the Alerta REST API",
                    position: (135, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (136, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "http://localhost:5000",
                    position: (136, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (137, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (137, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (137, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (134, 22),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "token",
               position: (140, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (140, 15),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (141, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Default Alerta authentication token",
                    position: (141, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (142, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (142, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (142, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (143, 9),
                   },
                  ],
                 },
                 String {
                  parts: [],
                 },
                ),
               ],
               recursive: false,
               position: (140, 24),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "environment",
               position: (146, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (146, 21),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (147, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Default Alerta environment",
                    position: (147, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (148, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (148, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (148, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (149, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Production",
                    position: (149, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (146, 30),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "origin",
               position: (152, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (152, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (153, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Default origin of alert",
                    position: (153, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (154, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (154, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (154, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (155, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "kapacitor",
                    position: (155, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (152, 25),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (131, 14),
         },
        ),
       ],
       recursive: false,
       position: (59, 32),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (160, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (160, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (160, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (160, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (161, 5),
             },
             Raw {
              content: "systemPackages",
              position: (161, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (161, 36),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "kapacitor",
                 position: (161, 41),
                },
               ],
              },
              default: None,
             },
            ],
            position: (161, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (163, 5),
             },
             Raw {
              content: "tmpfiles",
              position: (163, 13),
             },
             Raw {
              content: "rules",
              position: (163, 22),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "d '",
                position: (164, 8),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (164, 13),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "dataDir",
                    position: (164, 17),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "' - ",
                position: (164, 25),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (164, 31),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "user",
                    position: (164, 35),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " ",
                position: (164, 40),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (164, 43),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "group",
                    position: (164, 47),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " - -",
                position: (164, 53),
               },
              ],
             },
            ],
            position: (163, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (167, 5),
             },
             Raw {
              content: "services",
              position: (167, 13),
             },
             Raw {
              content: "kapacitor",
              position: (167, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (168, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Kapacitor Real-Time Stream Processing Engine",
                 position: (168, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (169, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (169, 21),
                  },
                 ],
                },
               ],
               position: (169, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (170, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "networking.target",
                   position: (170, 18),
                  },
                 ],
                },
               ],
               position: (170, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (171, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (172, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (172, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "kapacitor",
                        position: (172, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/kapacitord -config ",
                    position: (172, 39),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "kapacitorConf",
                     position: (172, 65),
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (173, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "kapacitor",
                    position: (173, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (174, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "kapacitor",
                    position: (174, 18),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (171, 23),
              },
             ),
            ],
            recursive: false,
            position: (167, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (178, 5),
             },
             Raw {
              content: "users",
              position: (178, 11),
             },
             Raw {
              content: "kapacitor",
              position: (178, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "uid",
                 position: (179, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "config",
                position: (179, 13),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "ids",
                  position: (179, 20),
                 },
                 Raw {
                  content: "uids",
                  position: (179, 24),
                 },
                 Raw {
                  content: "kapacitor",
                  position: (179, 29),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (180, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Kapacitor user",
                 position: (180, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "home",
                 position: (181, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (181, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "dataDir",
                  position: (181, 18),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (178, 29),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (184, 5),
             },
             Raw {
              content: "groups",
              position: (184, 11),
             },
             Raw {
              content: "kapacitor",
              position: (184, 18),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "gid",
                 position: (185, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "config",
                position: (185, 13),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "ids",
                  position: (185, 20),
                 },
                 Raw {
                  content: "gids",
                  position: (185, 24),
                 },
                 Raw {
                  content: "kapacitor",
                  position: (185, 29),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (184, 30),
           },
          ),
         ],
         recursive: false,
         position: (160, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (58, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}