---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "errbot",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "pluginEnv",
        position: (7, 3),
       },
      ],
     },
     to: Function {
      argument: Simple {
       identifier: "plugins",
      },
      definition: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "pkgs",
         position: (7, 24),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "buildEnv",
           position: (7, 29),
          },
         ],
        },
        default: None,
       },
       arguments: [
        Map {
         bindings: [
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "name",
              position: (8, 5),
             },
            ],
           },
           to: String {
            parts: [
             Raw {
              content: "errbot-plugins",
              position: (8, 13),
             },
            ],
            position: (8, 12),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "paths",
              position: (9, 5),
             },
            ],
           },
           to: Variable {
            identifier: "plugins",
            position: (9, 13),
           },
          },
         ],
         recursive: false,
         position: (7, 38),
        },
       ],
      },
      position: (7, 15),
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "mkConfigDir",
        position: (11, 3),
       },
      ],
     },
     to: Function {
      argument: Simple {
       identifier: "instanceCfg",
      },
      definition: Function {
       argument: Simple {
        identifier: "dataDir",
       },
       definition: FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (11, 39),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "writeTextDir",
            position: (11, 44),
           },
          ],
         },
         default: None,
        },
        arguments: [
         String {
          parts: [
           Raw {
            content: "config.py",
            position: (11, 58),
           },
          ],
          position: (11, 57),
         },
         String {
          parts: [
           Raw {
            content: "import logging\nBACKEND = ",
            position: (12, 1),
           },
           Raw {
            content: "'",
            position: (13, 15),
           },
           Expression {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "instanceCfg",
              position: (13, 18),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "backend",
                position: (13, 30),
               },
              ],
             },
             default: None,
            },
           },
           Raw {
            content: "'\nBOT_DATA_DIR = ",
            position: (13, 38),
           },
           Raw {
            content: "'",
            position: (14, 20),
           },
           Expression {
            expression: Variable {
             identifier: "dataDir",
             position: (14, 23),
            },
           },
           Raw {
            content: "'\nBOT_EXTRA_PLUGIN_DIR = ",
            position: (14, 31),
           },
           Raw {
            content: "'",
            position: (15, 28),
           },
           Expression {
            expression: FunctionApplication {
             function: Variable {
              identifier: "pluginEnv",
              position: (15, 31),
             },
             arguments: [
              PropertyAccess {
               expression: Variable {
                identifier: "instanceCfg",
                position: (15, 41),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "plugins",
                  position: (15, 53),
                 },
                ],
               },
               default: None,
              },
             ],
            },
           },
           Raw {
            content: "'\n\nBOT_LOG_LEVEL = logging.",
            position: (15, 61),
           },
           Expression {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "instanceCfg",
              position: (17, 31),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "logLevel",
                position: (17, 43),
               },
              ],
             },
             default: None,
            },
           },
           Raw {
            content: "\nBOT_LOG_FILE = False\n\nBOT_ADMINS = (",
            position: (17, 52),
           },
           Expression {
            expression: FunctionApplication {
             function: Variable {
              identifier: "concatMapStringsSep",
              position: (20, 21),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: ",",
                 position: (20, 42),
                },
               ],
               position: (20, 41),
              },
              Parentheses {
               expression: Function {
                argument: Simple {
                 identifier: "name",
                },
                definition: String {
                 parts: [
                  Raw {
                   content: "'",
                   position: (20, 53),
                  },
                  Expression {
                   expression: Variable {
                    identifier: "name",
                    position: (20, 56),
                   },
                  },
                  Raw {
                   content: "'",
                   position: (20, 61),
                  },
                 ],
                 position: (20, 52),
                },
                position: (20, 46),
               },
               position: (20, 45),
              },
              PropertyAccess {
               expression: Variable {
                identifier: "instanceCfg",
                position: (20, 65),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "admins",
                  position: (20, 77),
                 },
                ],
               },
               default: None,
              },
             ],
            },
           },
           Raw {
            content: ")\n\nBOT_IDENTITY = ",
            position: (20, 84),
           },
           Expression {
            expression: FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "builtins",
               position: (22, 22),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "toJSON",
                 position: (22, 31),
                },
               ],
              },
              default: None,
             },
             arguments: [
              PropertyAccess {
               expression: Variable {
                identifier: "instanceCfg",
                position: (22, 38),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "identity",
                  position: (22, 50),
                 },
                ],
               },
               default: None,
              },
             ],
            },
           },
           Raw {
            content: "\n\n",
            position: (22, 59),
           },
           Expression {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "instanceCfg",
              position: (24, 7),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "extraConfig",
                position: (24, 19),
               },
              ],
             },
             default: None,
            },
           },
           Raw {
            content: "\n",
            position: (24, 31),
           },
          ],
          position: (11, 69),
         },
        ],
       },
       position: (11, 30),
      },
      position: (11, 17),
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (27, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "services",
            position: (28, 5),
           },
           Raw {
            content: "errbot",
            position: (28, 14),
           },
           Raw {
            content: "instances",
            position: (28, 21),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (28, 33),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (29, 7),
                },
               ],
              },
              to: Map {
               bindings: [],
               recursive: false,
               position: (29, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (30, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "Errbot instance configs",
                 position: (30, 22),
                },
               ],
               position: (30, 21),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (31, 7),
                },
               ],
              },
              to: FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (31, 14),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "attrsOf",
                   position: (31, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                Parentheses {
                 expression: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (31, 29),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "submodule",
                      position: (31, 35),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   Map {
                    bindings: [
                     Binding {
                      from: AttributePath {
                       parts: [
                        Raw {
                         content: "options",
                         position: (32, 9),
                        },
                       ],
                      },
                      to: Map {
                       bindings: [
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "dataDir",
                            position: (33, 11),
                           },
                          ],
                         },
                         to: FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (33, 21),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "type",
                                 position: (34, 13),
                                },
                               ],
                              },
                              to: FunctionApplication {
                               function: PropertyAccess {
                                expression: Variable {
                                 identifier: "types",
                                 position: (34, 20),
                                },
                                attribute_path: AttributePath {
                                 parts: [
                                  Raw {
                                   content: "nullOr",
                                   position: (34, 26),
                                  },
                                 ],
                                },
                                default: None,
                               },
                               arguments: [
                                PropertyAccess {
                                 expression: Variable {
                                  identifier: "types",
                                  position: (34, 33),
                                 },
                                 attribute_path: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "path",
                                    position: (34, 39),
                                   },
                                  ],
                                 },
                                 default: None,
                                },
                               ],
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "default",
                                 position: (35, 13),
                                },
                               ],
                              },
                              to: Variable {
                               identifier: "null",
                               position: (35, 23),
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "description",
                                 position: (36, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "Data directory for errbot instance.",
                                 position: (36, 28),
                                },
                               ],
                               position: (36, 27),
                              },
                             },
                            ],
                            recursive: false,
                            position: (33, 30),
                           },
                          ],
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "plugins",
                            position: (39, 11),
                           },
                          ],
                         },
                         to: FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (39, 21),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "type",
                                 position: (40, 13),
                                },
                               ],
                              },
                              to: FunctionApplication {
                               function: PropertyAccess {
                                expression: Variable {
                                 identifier: "types",
                                 position: (40, 20),
                                },
                                attribute_path: AttributePath {
                                 parts: [
                                  Raw {
                                   content: "listOf",
                                   position: (40, 26),
                                  },
                                 ],
                                },
                                default: None,
                               },
                               arguments: [
                                PropertyAccess {
                                 expression: Variable {
                                  identifier: "types",
                                  position: (40, 33),
                                 },
                                 attribute_path: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "package",
                                    position: (40, 39),
                                   },
                                  ],
                                 },
                                 default: None,
                                },
                               ],
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "default",
                                 position: (41, 13),
                                },
                               ],
                              },
                              to: List {
                               elements: [],
                               position: (41, 23),
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "description",
                                 position: (42, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "List of errbot plugin derivations.",
                                 position: (42, 28),
                                },
                               ],
                               position: (42, 27),
                              },
                             },
                            ],
                            recursive: false,
                            position: (39, 30),
                           },
                          ],
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "logLevel",
                            position: (45, 11),
                           },
                          ],
                         },
                         to: FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (45, 22),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "type",
                                 position: (46, 13),
                                },
                               ],
                              },
                              to: PropertyAccess {
                               expression: Variable {
                                identifier: "types",
                                position: (46, 20),
                               },
                               attribute_path: AttributePath {
                                parts: [
                                 Raw {
                                  content: "str",
                                  position: (46, 26),
                                 },
                                ],
                               },
                               default: None,
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "default",
                                 position: (47, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "INFO",
                                 position: (47, 24),
                                },
                               ],
                               position: (47, 23),
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "description",
                                 position: (48, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "Errbot log level",
                                 position: (48, 28),
                                },
                               ],
                               position: (48, 27),
                              },
                             },
                            ],
                            recursive: false,
                            position: (45, 31),
                           },
                          ],
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "admins",
                            position: (51, 11),
                           },
                          ],
                         },
                         to: FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (51, 20),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "type",
                                 position: (52, 13),
                                },
                               ],
                              },
                              to: FunctionApplication {
                               function: PropertyAccess {
                                expression: Variable {
                                 identifier: "types",
                                 position: (52, 20),
                                },
                                attribute_path: AttributePath {
                                 parts: [
                                  Raw {
                                   content: "listOf",
                                   position: (52, 26),
                                  },
                                 ],
                                },
                                default: None,
                               },
                               arguments: [
                                PropertyAccess {
                                 expression: Variable {
                                  identifier: "types",
                                  position: (52, 33),
                                 },
                                 attribute_path: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "str",
                                    position: (52, 39),
                                   },
                                  ],
                                 },
                                 default: None,
                                },
                               ],
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "default",
                                 position: (53, 13),
                                },
                               ],
                              },
                              to: List {
                               elements: [],
                               position: (53, 23),
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "description",
                                 position: (54, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "List of identifiers of errbot admins.",
                                 position: (54, 28),
                                },
                               ],
                               position: (54, 27),
                              },
                             },
                            ],
                            recursive: false,
                            position: (51, 29),
                           },
                          ],
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "backend",
                            position: (57, 11),
                           },
                          ],
                         },
                         to: FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (57, 21),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "type",
                                 position: (58, 13),
                                },
                               ],
                              },
                              to: PropertyAccess {
                               expression: Variable {
                                identifier: "types",
                                position: (58, 20),
                               },
                               attribute_path: AttributePath {
                                parts: [
                                 Raw {
                                  content: "str",
                                  position: (58, 26),
                                 },
                                ],
                               },
                               default: None,
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "default",
                                 position: (59, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "XMPP",
                                 position: (59, 24),
                                },
                               ],
                               position: (59, 23),
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "description",
                                 position: (60, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "Errbot backend name.",
                                 position: (60, 28),
                                },
                               ],
                               position: (60, 27),
                              },
                             },
                            ],
                            recursive: false,
                            position: (57, 30),
                           },
                          ],
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "identity",
                            position: (63, 11),
                           },
                          ],
                         },
                         to: FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (63, 22),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "type",
                                 position: (64, 13),
                                },
                               ],
                              },
                              to: PropertyAccess {
                               expression: Variable {
                                identifier: "types",
                                position: (64, 20),
                               },
                               attribute_path: AttributePath {
                                parts: [
                                 Raw {
                                  content: "attrs",
                                  position: (64, 26),
                                 },
                                ],
                               },
                               default: None,
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "description",
                                 position: (65, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "Errbot identity configuration",
                                 position: (65, 28),
                                },
                               ],
                               position: (65, 27),
                              },
                             },
                            ],
                            recursive: false,
                            position: (63, 31),
                           },
                          ],
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "extraConfig",
                            position: (68, 11),
                           },
                          ],
                         },
                         to: FunctionApplication {
                          function: Variable {
                           identifier: "mkOption",
                           position: (68, 25),
                          },
                          arguments: [
                           Map {
                            bindings: [
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "type",
                                 position: (69, 13),
                                },
                               ],
                              },
                              to: PropertyAccess {
                               expression: Variable {
                                identifier: "types",
                                position: (69, 20),
                               },
                               attribute_path: AttributePath {
                                parts: [
                                 Raw {
                                  content: "lines",
                                  position: (69, 26),
                                 },
                                ],
                               },
                               default: None,
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "default",
                                 position: (70, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [],
                               position: (70, 23),
                              },
                             },
                             Binding {
                              from: AttributePath {
                               parts: [
                                Raw {
                                 content: "description",
                                 position: (71, 13),
                                },
                               ],
                              },
                              to: String {
                               parts: [
                                Raw {
                                 content: "String to be appended to the config verbatim",
                                 position: (71, 28),
                                },
                               ],
                               position: (71, 27),
                              },
                             },
                            ],
                            recursive: false,
                            position: (68, 34),
                           },
                          ],
                         },
                        },
                       ],
                       recursive: false,
                       position: (32, 19),
                      },
                     },
                    ],
                    recursive: false,
                    position: (31, 45),
                   },
                  ],
                 },
                 position: (31, 28),
                },
               ],
              },
             },
            ],
            recursive: false,
            position: (28, 42),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (27, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (78, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (78, 12),
       },
       arguments: [
        Parentheses {
         expression: BinaryOperation {
          operator: NotEqualTo,
          operands: [
           PropertyAccess {
            expression: Variable {
             identifier: "cfg",
             position: (78, 18),
            },
            attribute_path: AttributePath {
             parts: [
              Raw {
               content: "instances",
               position: (78, 22),
              },
             ],
            },
            default: None,
           },
           Map {
            bindings: [],
            recursive: false,
            position: (78, 35),
           },
          ],
          position: (78, 32),
         },
         position: (78, 17),
        },
        Map {
         bindings: [
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "users",
              position: (79, 5),
             },
             Raw {
              content: "users",
              position: (79, 11),
             },
             Raw {
              content: "errbot",
              position: (79, 17),
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "group",
                 position: (80, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "errbot",
                 position: (80, 16),
                },
               ],
               position: (80, 15),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "isSystemUser",
                 position: (81, 7),
                },
               ],
              },
              to: Variable {
               identifier: "true",
               position: (81, 22),
              },
             },
            ],
            recursive: false,
            position: (79, 26),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "users",
              position: (83, 5),
             },
             Raw {
              content: "groups",
              position: (83, 11),
             },
             Raw {
              content: "errbot",
              position: (83, 18),
             },
            ],
           },
           to: Map {
            bindings: [],
            recursive: false,
            position: (83, 27),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "systemd",
              position: (85, 5),
             },
             Raw {
              content: "services",
              position: (85, 13),
             },
            ],
           },
           to: FunctionApplication {
            function: Variable {
             identifier: "mapAttrs'",
             position: (85, 24),
            },
            arguments: [
             Parentheses {
              expression: Function {
               argument: Simple {
                identifier: "name",
               },
               definition: Function {
                argument: Simple {
                 identifier: "instanceCfg",
                },
                definition: FunctionApplication {
                 function: Variable {
                  identifier: "nameValuePair",
                  position: (85, 54),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: "errbot-",
                     position: (85, 69),
                    },
                    Expression {
                     expression: Variable {
                      identifier: "name",
                      position: (85, 78),
                     },
                    },
                   ],
                   position: (85, 68),
                  },
                  Parentheses {
                   expression: LetIn {
                    bindings: [
                     Binding {
                      from: AttributePath {
                       parts: [
                        Raw {
                         content: "dataDir",
                         position: (87, 7),
                        },
                       ],
                      },
                      to: IfThenElse {
                       predicate: BinaryOperation {
                        operator: NotEqualTo,
                        operands: [
                         PropertyAccess {
                          expression: Variable {
                           identifier: "instanceCfg",
                           position: (87, 20),
                          },
                          attribute_path: AttributePath {
                           parts: [
                            Raw {
                             content: "dataDir",
                             position: (87, 32),
                            },
                           ],
                          },
                          default: None,
                         },
                         Variable {
                          identifier: "null",
                          position: (87, 43),
                         },
                        ],
                        position: (87, 40),
                       },
                       then: PropertyAccess {
                        expression: Variable {
                         identifier: "instanceCfg",
                         position: (87, 53),
                        },
                        attribute_path: AttributePath {
                         parts: [
                          Raw {
                           content: "dataDir",
                           position: (87, 65),
                          },
                         ],
                        },
                        default: None,
                       },
                       else_: String {
                        parts: [
                         Raw {
                          content: "/var/lib/errbot/",
                          position: (88, 10),
                         },
                         Expression {
                          expression: Variable {
                           identifier: "name",
                           position: (88, 28),
                          },
                         },
                        ],
                        position: (88, 9),
                       },
                       position: (87, 17),
                      },
                     },
                    ],
                    target: Map {
                     bindings: [
                      Binding {
                       from: AttributePath {
                        parts: [
                         Raw {
                          content: "after",
                          position: (90, 7),
                         },
                        ],
                       },
                       to: List {
                        elements: [
                         String {
                          parts: [
                           Raw {
                            content: "network-online.target",
                            position: (90, 18),
                           },
                          ],
                          position: (90, 17),
                         },
                        ],
                        position: (90, 15),
                       },
                      },
                      Binding {
                       from: AttributePath {
                        parts: [
                         Raw {
                          content: "wantedBy",
                          position: (91, 7),
                         },
                        ],
                       },
                       to: List {
                        elements: [
                         String {
                          parts: [
                           Raw {
                            content: "multi-user.target",
                            position: (91, 21),
                           },
                          ],
                          position: (91, 20),
                         },
                        ],
                        position: (91, 18),
                       },
                      },
                      Binding {
                       from: AttributePath {
                        parts: [
                         Raw {
                          content: "preStart",
                          position: (92, 7),
                         },
                        ],
                       },
                       to: String {
                        parts: [
                         Raw {
                          content: "mkdir -p ",
                          position: (93, 1),
                         },
                         Expression {
                          expression: Variable {
                           identifier: "dataDir",
                           position: (93, 20),
                          },
                         },
                         Raw {
                          content: "\nchown -R errbot:errbot ",
                          position: (93, 28),
                         },
                         Expression {
                          expression: Variable {
                           identifier: "dataDir",
                           position: (94, 34),
                          },
                         },
                         Raw {
                          content: "\n",
                          position: (94, 42),
                         },
                        ],
                        position: (92, 18),
                       },
                      },
                      Binding {
                       from: AttributePath {
                        parts: [
                         Raw {
                          content: "serviceConfig",
                          position: (96, 7),
                         },
                        ],
                       },
                       to: Map {
                        bindings: [
                         Binding {
                          from: AttributePath {
                           parts: [
                            Raw {
                             content: "User",
                             position: (97, 9),
                            },
                           ],
                          },
                          to: String {
                           parts: [
                            Raw {
                             content: "errbot",
                             position: (97, 17),
                            },
                           ],
                           position: (97, 16),
                          },
                         },
                         Binding {
                          from: AttributePath {
                           parts: [
                            Raw {
                             content: "Restart",
                             position: (98, 9),
                            },
                           ],
                          },
                          to: String {
                           parts: [
                            Raw {
                             content: "on-failure",
                             position: (98, 20),
                            },
                           ],
                           position: (98, 19),
                          },
                         },
                         Binding {
                          from: AttributePath {
                           parts: [
                            Raw {
                             content: "ExecStart",
                             position: (99, 9),
                            },
                           ],
                          },
                          to: String {
                           parts: [
                            Expression {
                             expression: PropertyAccess {
                              expression: Variable {
                               identifier: "pkgs",
                               position: (99, 24),
                              },
                              attribute_path: AttributePath {
                               parts: [
                                Raw {
                                 content: "errbot",
                                 position: (99, 29),
                                },
                               ],
                              },
                              default: None,
                             },
                            },
                            Raw {
                             content: "/bin/errbot -c ",
                             position: (99, 36),
                            },
                            Expression {
                             expression: FunctionApplication {
                              function: Variable {
                               identifier: "mkConfigDir",
                               position: (99, 53),
                              },
                              arguments: [
                               Variable {
                                identifier: "instanceCfg",
                                position: (99, 65),
                               },
                               Variable {
                                identifier: "dataDir",
                                position: (99, 77),
                               },
                              ],
                             },
                            },
                            Raw {
                             content: "/config.py",
                             position: (99, 85),
                            },
                           ],
                           position: (99, 21),
                          },
                         },
                         Binding {
                          from: AttributePath {
                           parts: [
                            Raw {
                             content: "PermissionsStartOnly",
                             position: (100, 9),
                            },
                           ],
                          },
                          to: Variable {
                           identifier: "true",
                           position: (100, 32),
                          },
                         },
                        ],
                        recursive: false,
                        position: (96, 23),
                       },
                      },
                     ],
                     recursive: false,
                     position: (89, 8),
                    },
                    position: (86, 5),
                   },
                   position: (85, 85),
                  },
                 ],
                },
                position: (85, 41),
               },
               position: (85, 35),
              },
              position: (85, 34),
             },
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (102, 9),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "instances",
                 position: (102, 13),
                },
               ],
              },
              default: None,
             },
            ],
           },
          },
         ],
         recursive: false,
         position: (78, 39),
        },
       ],
      },
     },
    ],
    recursive: false,
    position: (26, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}