---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: LetIn {
  bindings: [
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "cfg",
       position: (3, 3),
      },
     ],
    },
    PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (3, 9),
     },
     attribute_path: AttributePath {
      attributes: [
       Raw {
        content: "services",
        position: (3, 16),
       },
       Raw {
        content: "dendrite",
        position: (3, 25),
       },
      ],
     },
     default: None,
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "settingsFormat",
       position: (4, 3),
      },
     ],
    },
    FunctionApplication {
     function: PropertyAccess {
      expression: Variable {
       identifier: "pkgs",
       position: (4, 20),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "formats",
         position: (4, 25),
        },
        Raw {
         content: "yaml",
         position: (4, 33),
        },
       ],
      },
      default: None,
     },
     arguments: [
      Map {
       bindings: [],
       recursive: false,
       position: (4, 38),
      },
     ],
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "configurationYaml",
       position: (5, 3),
      },
     ],
    },
    FunctionApplication {
     function: PropertyAccess {
      expression: Variable {
       identifier: "settingsFormat",
       position: (5, 23),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "generate",
         position: (5, 38),
        },
       ],
      },
      default: None,
     },
     arguments: [
      String {
       parts: [
        Raw {
         content: "dendrite.yaml",
         position: (5, 48),
        },
       ],
      },
      PropertyAccess {
       expression: Variable {
        identifier: "cfg",
        position: (5, 63),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "settings",
          position: (5, 67),
         },
        ],
       },
       default: None,
      },
     ],
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "workingDir",
       position: (6, 3),
      },
     ],
    },
    String {
     parts: [
      Raw {
       content: "/var/lib/dendrite",
       position: (6, 17),
      },
     ],
    },
   ),
  ],
  target: Map {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "options",
        position: (9, 3),
       },
       Raw {
        content: "services",
        position: (9, 11),
       },
       Raw {
        content: "dendrite",
        position: (9, 20),
       },
      ],
     },
     Map {
      bindings: [
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "enable",
           position: (10, 5),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (10, 14),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "mkEnableOption",
             position: (10, 18),
            },
           ],
          },
          default: None,
         },
         arguments: [
          String {
           parts: [
            Raw {
             content: "matrix.org dendrite",
             position: (10, 34),
            },
           ],
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "httpPort",
           position: (11, 5),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (11, 16),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "mkOption",
             position: (11, 20),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (12, 7),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "lib",
                position: (12, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "types",
                  position: (12, 18),
                 },
                 Raw {
                  content: "nullOr",
                  position: (12, 24),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "lib",
                 position: (12, 31),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "types",
                   position: (12, 35),
                  },
                  Raw {
                   content: "port",
                   position: (12, 41),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (13, 7),
               },
              ],
             },
             Int {
              value: 8008,
              position: (13, 17),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (14, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "The port to listen for HTTP requests on.\n",
                position: (15, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (11, 29),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "httpsPort",
           position: (18, 5),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (18, 17),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "mkOption",
             position: (18, 21),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (19, 7),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "lib",
                position: (19, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "types",
                  position: (19, 18),
                 },
                 Raw {
                  content: "nullOr",
                  position: (19, 24),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "lib",
                 position: (19, 31),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "types",
                   position: (19, 35),
                  },
                  Raw {
                   content: "port",
                   position: (19, 41),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (20, 7),
               },
              ],
             },
             Variable {
              identifier: "null",
              position: (20, 17),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (21, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "The port to listen for HTTPS requests on.\n",
                position: (22, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (18, 30),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "tlsCert",
           position: (25, 5),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (25, 15),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "mkOption",
             position: (25, 19),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (26, 7),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "lib",
                position: (26, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "types",
                  position: (26, 18),
                 },
                 Raw {
                  content: "nullOr",
                  position: (26, 24),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "lib",
                 position: (26, 31),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "types",
                   position: (26, 35),
                  },
                  Raw {
                   content: "path",
                   position: (26, 41),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "example",
                position: (27, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "/var/lib/dendrite/server.cert",
                position: (27, 18),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (28, 7),
               },
              ],
             },
             Variable {
              identifier: "null",
              position: (28, 17),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (29, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "The path to the TLS certificate.\n\n<programlisting>\n  nix-shell -p dendrite --command \"generate-keys --tls-cert server.crt --tls-key server.key\"\n</programlisting>\n",
                position: (30, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (25, 28),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "tlsKey",
           position: (37, 5),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (37, 14),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "mkOption",
             position: (37, 18),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (38, 7),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "lib",
                position: (38, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "types",
                  position: (38, 18),
                 },
                 Raw {
                  content: "nullOr",
                  position: (38, 24),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "lib",
                 position: (38, 31),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "types",
                   position: (38, 35),
                  },
                  Raw {
                   content: "path",
                   position: (38, 41),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "example",
                position: (39, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "/var/lib/dendrite/server.key",
                position: (39, 18),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (40, 7),
               },
              ],
             },
             Variable {
              identifier: "null",
              position: (40, 17),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (41, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "The path to the TLS key.\n\n<programlisting>\n  nix-shell -p dendrite --command \"generate-keys --tls-cert server.crt --tls-key server.key\"\n</programlisting>\n",
                position: (42, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (37, 27),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "environmentFile",
           position: (49, 5),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (49, 23),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "mkOption",
             position: (49, 27),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (50, 7),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "lib",
                position: (50, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "types",
                  position: (50, 18),
                 },
                 Raw {
                  content: "nullOr",
                  position: (50, 24),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "lib",
                 position: (50, 31),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "types",
                   position: (50, 35),
                  },
                  Raw {
                   content: "path",
                   position: (50, 41),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "example",
                position: (51, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "/var/lib/dendrite/registration_secret",
                position: (51, 18),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (52, 7),
               },
              ],
             },
             Variable {
              identifier: "null",
              position: (52, 17),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (53, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "Environment file as defined in <citerefentry>\n<refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum>\n</citerefentry>.\nSecrets may be passed to the service without adding them to the world-readable\nNix store, by specifying placeholder variables as the option value in Nix and\nsetting these variables accordingly in the environment file. Currently only used\nfor the registration secret to allow secure registration when\nclient_api.registration_disabled is true.\n\n<programlisting>\n  # snippet of dendrite-related config\n  services.dendrite.settings.client_api.registration_shared_secret = \"$REGISTRATION_SHARED_SECRET\";\n</programlisting>\n\n<programlisting>\n  # content of the environment file\n  REGISTRATION_SHARED_SECRET=verysecretpassword\n</programlisting>\n\nNote that this file needs to be available on the host on which\n<literal>dendrite</literal> is running.\n",
                position: (54, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (49, 36),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "settings",
           position: (77, 5),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (77, 16),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "mkOption",
             position: (77, 20),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (78, 7),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "lib",
                position: (78, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "types",
                  position: (78, 18),
                 },
                 Raw {
                  content: "submodule",
                  position: (78, 24),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "freeformType",
                     position: (79, 9),
                    },
                   ],
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "settingsFormat",
                    position: (79, 24),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "type",
                      position: (79, 39),
                     },
                    ],
                   },
                   default: None,
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "options",
                     position: (80, 9),
                    },
                    Raw {
                     content: "global",
                     position: (80, 17),
                    },
                   ],
                  },
                  Map {
                   bindings: [
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "server_name",
                        position: (81, 11),
                       },
                      ],
                     },
                     FunctionApplication {
                      function: PropertyAccess {
                       expression: Variable {
                        identifier: "lib",
                        position: (81, 25),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "mkOption",
                          position: (81, 29),
                         },
                        ],
                       },
                       default: None,
                      },
                      arguments: [
                       Map {
                        bindings: [
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "type",
                             position: (82, 13),
                            },
                           ],
                          },
                          PropertyAccess {
                           expression: Variable {
                            identifier: "lib",
                            position: (82, 20),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "types",
                              position: (82, 24),
                             },
                             Raw {
                              content: "str",
                              position: (82, 30),
                             },
                            ],
                           },
                           default: None,
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "example",
                             position: (83, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "example.com",
                             position: (83, 24),
                            },
                           ],
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "description",
                             position: (84, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "The domain name of the server, with optional explicit port.\nThis is used by remote servers to connect to this server.\nThis is also the last part of your UserID.\n",
                             position: (85, 1),
                            },
                           ],
                          },
                         ),
                        ],
                        recursive: false,
                        position: (81, 38),
                       },
                      ],
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "private_key",
                        position: (90, 11),
                       },
                      ],
                     },
                     FunctionApplication {
                      function: PropertyAccess {
                       expression: Variable {
                        identifier: "lib",
                        position: (90, 25),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "mkOption",
                          position: (90, 29),
                         },
                        ],
                       },
                       default: None,
                      },
                      arguments: [
                       Map {
                        bindings: [
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "type",
                             position: (91, 13),
                            },
                           ],
                          },
                          PropertyAccess {
                           expression: Variable {
                            identifier: "lib",
                            position: (91, 20),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "types",
                              position: (91, 24),
                             },
                             Raw {
                              content: "path",
                              position: (91, 30),
                             },
                            ],
                           },
                           default: None,
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "example",
                             position: (92, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Expression {
                             expression: Variable {
                              identifier: "workingDir",
                              position: (92, 26),
                             },
                            },
                            Raw {
                             content: "/matrix_key.pem",
                             position: (92, 37),
                            },
                           ],
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "description",
                             position: (93, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "The path to the signing private key file, used to sign\nrequests and events.\n\n<programlisting>\n  nix-shell -p dendrite --command \"generate-keys --private-key matrix_key.pem\"\n</programlisting>\n",
                             position: (94, 1),
                            },
                           ],
                          },
                         ),
                        ],
                        recursive: false,
                        position: (90, 38),
                       },
                      ],
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "trusted_third_party_id_servers",
                        position: (102, 11),
                       },
                      ],
                     },
                     FunctionApplication {
                      function: PropertyAccess {
                       expression: Variable {
                        identifier: "lib",
                        position: (102, 44),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "mkOption",
                          position: (102, 48),
                         },
                        ],
                       },
                       default: None,
                      },
                      arguments: [
                       Map {
                        bindings: [
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "type",
                             position: (103, 13),
                            },
                           ],
                          },
                          FunctionApplication {
                           function: PropertyAccess {
                            expression: Variable {
                             identifier: "lib",
                             position: (103, 20),
                            },
                            attribute_path: AttributePath {
                             attributes: [
                              Raw {
                               content: "types",
                               position: (103, 24),
                              },
                              Raw {
                               content: "listOf",
                               position: (103, 30),
                              },
                             ],
                            },
                            default: None,
                           },
                           arguments: [
                            PropertyAccess {
                             expression: Variable {
                              identifier: "lib",
                              position: (103, 37),
                             },
                             attribute_path: AttributePath {
                              attributes: [
                               Raw {
                                content: "types",
                                position: (103, 41),
                               },
                               Raw {
                                content: "str",
                                position: (103, 47),
                               },
                              ],
                             },
                             default: None,
                            },
                           ],
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "example",
                             position: (104, 13),
                            },
                           ],
                          },
                          List {
                           elements: [
                            String {
                             parts: [
                              Raw {
                               content: "matrix.org",
                               position: (104, 26),
                              },
                             ],
                            },
                           ],
                           position: (104, 23),
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "default",
                             position: (105, 13),
                            },
                           ],
                          },
                          List {
                           elements: [
                            String {
                             parts: [
                              Raw {
                               content: "matrix.org",
                               position: (105, 26),
                              },
                             ],
                            },
                            String {
                             parts: [
                              Raw {
                               content: "vector.im",
                               position: (105, 39),
                              },
                             ],
                            },
                           ],
                           position: (105, 23),
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "description",
                             position: (106, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "Lists of domains that the server will trust as identity\nservers to verify third party identifiers such as phone\nnumbers and email addresses\n",
                             position: (107, 1),
                            },
                           ],
                          },
                         ),
                        ],
                        recursive: false,
                        position: (102, 57),
                       },
                      ],
                     },
                    ),
                   ],
                   recursive: false,
                   position: (80, 26),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "options",
                     position: (113, 9),
                    },
                    Raw {
                     content: "client_api",
                     position: (113, 17),
                    },
                   ],
                  },
                  Map {
                   bindings: [
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "registration_disabled",
                        position: (114, 11),
                       },
                      ],
                     },
                     FunctionApplication {
                      function: PropertyAccess {
                       expression: Variable {
                        identifier: "lib",
                        position: (114, 35),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "mkOption",
                          position: (114, 39),
                         },
                        ],
                       },
                       default: None,
                      },
                      arguments: [
                       Map {
                        bindings: [
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "type",
                             position: (115, 13),
                            },
                           ],
                          },
                          PropertyAccess {
                           expression: Variable {
                            identifier: "lib",
                            position: (115, 20),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "types",
                              position: (115, 24),
                             },
                             Raw {
                              content: "bool",
                              position: (115, 30),
                             },
                            ],
                           },
                           default: None,
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "default",
                             position: (116, 13),
                            },
                           ],
                          },
                          Variable {
                           identifier: "true",
                           position: (116, 23),
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "description",
                             position: (117, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "Whether to disable user registration to the server\nwithout the shared secret.\n",
                             position: (118, 1),
                            },
                           ],
                          },
                         ),
                        ],
                        recursive: false,
                        position: (114, 48),
                       },
                      ],
                     },
                    ),
                   ],
                   recursive: false,
                   position: (113, 30),
                  },
                 ),
                ],
                recursive: false,
                position: (78, 34),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (124, 7),
               },
              ],
             },
             Map {
              bindings: [],
              recursive: false,
              position: (124, 17),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (125, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "Configuration for dendrite, see:\n<link xlink:href=\"https://github.com/matrix-org/dendrite/blob/master/dendrite-config.yaml\"/>\nfor available options with which to populate settings.\n",
                position: (126, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (77, 29),
          },
         ],
        },
       ),
      ],
      recursive: false,
      position: (9, 31),
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "config",
        position: (133, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "lib",
        position: (133, 12),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "mkIf",
          position: (133, 16),
         },
        ],
       },
       default: None,
      },
      arguments: [
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (133, 21),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "enable",
           position: (133, 25),
          },
         ],
        },
        default: None,
       },
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "assertions",
             position: (134, 5),
            },
           ],
          },
          List {
           elements: [
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "assertion",
                  position: (135, 7),
                 },
                ],
               },
               BinaryOperation {
                operator: Implication,
                operands: [
                 BinaryOperation {
                  operator: NotEqualTo,
                  operands: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (135, 19),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "httpsPort",
                       position: (135, 23),
                      },
                     ],
                    },
                    default: None,
                   },
                   Variable {
                    identifier: "null",
                    position: (135, 36),
                   },
                  ],
                  position: (135, 33),
                 },
                 BinaryOperation {
                  operator: LogicalAnd,
                  operands: [
                   BinaryOperation {
                    operator: NotEqualTo,
                    operands: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (135, 45),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "tlsCert",
                         position: (135, 49),
                        },
                       ],
                      },
                      default: None,
                     },
                     Variable {
                      identifier: "null",
                      position: (135, 60),
                     },
                    ],
                    position: (135, 57),
                   },
                   BinaryOperation {
                    operator: NotEqualTo,
                    operands: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (135, 68),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "tlsKey",
                         position: (135, 72),
                        },
                       ],
                      },
                      default: None,
                     },
                     Variable {
                      identifier: "null",
                      position: (135, 82),
                     },
                    ],
                    position: (135, 79),
                   },
                  ],
                  position: (135, 65),
                 },
                ],
                position: (135, 41),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "message",
                  position: (136, 7),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "If Dendrite is configured to use https, tlsCert and tlsKey must be provided.\n\nnix-shell -p dendrite --command \"generate-keys --tls-cert server.crt --tls-key server.key\"\n",
                  position: (137, 1),
                 },
                ],
               },
              ),
             ],
             recursive: false,
             position: (134, 19),
            },
           ],
           position: (134, 18),
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "systemd",
             position: (143, 5),
            },
            Raw {
             content: "services",
             position: (143, 13),
            },
            Raw {
             content: "dendrite",
             position: (143, 22),
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (144, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "Dendrite Matrix homeserver",
                position: (144, 22),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "after",
                position: (145, 7),
               },
              ],
             },
             List {
              elements: [
               String {
                parts: [
                 Raw {
                  content: "network.target",
                  position: (146, 10),
                 },
                ],
               },
              ],
              position: (145, 15),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "wantedBy",
                position: (148, 7),
               },
              ],
             },
             List {
              elements: [
               String {
                parts: [
                 Raw {
                  content: "multi-user.target",
                  position: (148, 21),
                 },
                ],
               },
              ],
              position: (148, 18),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "serviceConfig",
                position: (149, 7),
               },
              ],
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "Type",
                   position: (150, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "simple",
                   position: (150, 17),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "DynamicUser",
                   position: (151, 9),
                  },
                 ],
                },
                Variable {
                 identifier: "true",
                 position: (151, 23),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "StateDirectory",
                   position: (152, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "dendrite",
                   position: (152, 27),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "WorkingDirectory",
                   position: (153, 9),
                  },
                 ],
                },
                Variable {
                 identifier: "workingDir",
                 position: (153, 28),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "RuntimeDirectory",
                   position: (154, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "dendrite",
                   position: (154, 29),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "RuntimeDirectoryMode",
                   position: (155, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "0700",
                   position: (155, 33),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "EnvironmentFile",
                   position: (156, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: PropertyAccess {
                  expression: Variable {
                   identifier: "lib",
                   position: (156, 27),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "mkIf",
                     position: (156, 31),
                    },
                   ],
                  },
                  default: None,
                 },
                 arguments: [
                  BinaryOperation {
                   operator: NotEqualTo,
                   operands: [
                    PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (156, 37),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "environmentFile",
                        position: (156, 41),
                       },
                      ],
                     },
                     default: None,
                    },
                    Variable {
                     identifier: "null",
                     position: (156, 60),
                    },
                   ],
                   position: (156, 57),
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (156, 66),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "environmentFile",
                      position: (156, 70),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "ExecStartPre",
                   position: (157, 9),
                  },
                 ],
                },
                IfThenElse {
                 predicate: BinaryOperation {
                  operator: NotEqualTo,
                  operands: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (158, 15),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "environmentFile",
                       position: (158, 19),
                      },
                     ],
                    },
                    default: None,
                   },
                   Variable {
                    identifier: "null",
                    position: (158, 38),
                   },
                  ],
                  position: (158, 35),
                 },
                 then: String {
                  parts: [
                   Raw {
                    content: "",
                    position: (159, 1),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (159, 15),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "envsubst",
                        position: (159, 20),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/envsubst \\\n  -i ",
                    position: (159, 29),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "configurationYaml",
                     position: (160, 20),
                    },
                   },
                   Raw {
                    content: " \\\n  -o /run/dendrite/dendrite.yaml\n",
                    position: (160, 38),
                   },
                  ],
                 },
                 else_: String {
                  parts: [
                   Raw {
                    content: "",
                    position: (163, 1),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (163, 15),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "coreutils",
                        position: (163, 20),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/cp ",
                    position: (163, 30),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "configurationYaml",
                     position: (163, 40),
                    },
                   },
                   Raw {
                    content: " /run/dendrite/dendrite.yaml\n",
                    position: (163, 58),
                   },
                  ],
                 },
                 position: (158, 11),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "ExecStart",
                   position: (165, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: PropertyAccess {
                  expression: Variable {
                   identifier: "lib",
                   position: (165, 21),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "strings",
                     position: (165, 25),
                    },
                    Raw {
                     content: "concatStringsSep",
                     position: (165, 33),
                    },
                   ],
                  },
                  default: None,
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: " ",
                     position: (165, 51),
                    },
                   ],
                  },
                  BinaryOperation {
                   operator: Concatenation,
                   operands: [
                    List {
                     elements: [
                      String {
                       parts: [
                        Expression {
                         expression: PropertyAccess {
                          expression: Variable {
                           identifier: "pkgs",
                           position: (166, 14),
                          },
                          attribute_path: AttributePath {
                           attributes: [
                            Raw {
                             content: "dendrite",
                             position: (166, 19),
                            },
                           ],
                          },
                          default: None,
                         },
                        },
                        Raw {
                         content: "/bin/dendrite-monolith-server",
                         position: (166, 28),
                        },
                       ],
                      },
                      String {
                       parts: [
                        Raw {
                         content: "--config /run/dendrite/dendrite.yaml",
                         position: (167, 12),
                        },
                       ],
                      },
                     ],
                     position: (165, 55),
                    },
                    BinaryOperation {
                     operator: Concatenation,
                     operands: [
                      FunctionApplication {
                       function: PropertyAccess {
                        expression: Variable {
                         identifier: "lib",
                         position: (168, 14),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "optionals",
                           position: (168, 18),
                          },
                         ],
                        },
                        default: None,
                       },
                       arguments: [
                        BinaryOperation {
                         operator: NotEqualTo,
                         operands: [
                          PropertyAccess {
                           expression: Variable {
                            identifier: "cfg",
                            position: (168, 29),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "httpPort",
                              position: (168, 33),
                             },
                            ],
                           },
                           default: None,
                          },
                          Variable {
                           identifier: "null",
                           position: (168, 45),
                          },
                         ],
                         position: (168, 42),
                        },
                        List {
                         elements: [
                          String {
                           parts: [
                            Raw {
                             content: "--http-bind-address :",
                             position: (169, 12),
                            },
                            Expression {
                             expression: FunctionApplication {
                              function: PropertyAccess {
                               expression: Variable {
                                identifier: "builtins",
                                position: (169, 35),
                               },
                               attribute_path: AttributePath {
                                attributes: [
                                 Raw {
                                  content: "toString",
                                  position: (169, 44),
                                 },
                                ],
                               },
                               default: None,
                              },
                              arguments: [
                               PropertyAccess {
                                expression: Variable {
                                 identifier: "cfg",
                                 position: (169, 53),
                                },
                                attribute_path: AttributePath {
                                 attributes: [
                                  Raw {
                                   content: "httpPort",
                                   position: (169, 57),
                                  },
                                 ],
                                },
                                default: None,
                               },
                              ],
                             },
                            },
                           ],
                          },
                         ],
                         position: (168, 51),
                        },
                       ],
                      },
                      FunctionApplication {
                       function: PropertyAccess {
                        expression: Variable {
                         identifier: "lib",
                         position: (170, 14),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "optionals",
                           position: (170, 18),
                          },
                         ],
                        },
                        default: None,
                       },
                       arguments: [
                        BinaryOperation {
                         operator: NotEqualTo,
                         operands: [
                          PropertyAccess {
                           expression: Variable {
                            identifier: "cfg",
                            position: (170, 29),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "httpsPort",
                              position: (170, 33),
                             },
                            ],
                           },
                           default: None,
                          },
                          Variable {
                           identifier: "null",
                           position: (170, 46),
                          },
                         ],
                         position: (170, 43),
                        },
                        List {
                         elements: [
                          String {
                           parts: [
                            Raw {
                             content: "--https-bind-address :",
                             position: (171, 12),
                            },
                            Expression {
                             expression: FunctionApplication {
                              function: PropertyAccess {
                               expression: Variable {
                                identifier: "builtins",
                                position: (171, 36),
                               },
                               attribute_path: AttributePath {
                                attributes: [
                                 Raw {
                                  content: "toString",
                                  position: (171, 45),
                                 },
                                ],
                               },
                               default: None,
                              },
                              arguments: [
                               PropertyAccess {
                                expression: Variable {
                                 identifier: "cfg",
                                 position: (171, 54),
                                },
                                attribute_path: AttributePath {
                                 attributes: [
                                  Raw {
                                   content: "httpsPort",
                                   position: (171, 58),
                                  },
                                 ],
                                },
                                default: None,
                               },
                              ],
                             },
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "--tls-cert ",
                             position: (172, 12),
                            },
                            Expression {
                             expression: PropertyAccess {
                              expression: Variable {
                               identifier: "cfg",
                               position: (172, 25),
                              },
                              attribute_path: AttributePath {
                               attributes: [
                                Raw {
                                 content: "tlsCert",
                                 position: (172, 29),
                                },
                               ],
                              },
                              default: None,
                             },
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "--tls-key ",
                             position: (173, 12),
                            },
                            Expression {
                             expression: PropertyAccess {
                              expression: Variable {
                               identifier: "cfg",
                               position: (173, 24),
                              },
                              attribute_path: AttributePath {
                               attributes: [
                                Raw {
                                 content: "tlsKey",
                                 position: (173, 28),
                                },
                               ],
                              },
                              default: None,
                             },
                            },
                           ],
                          },
                         ],
                         position: (170, 52),
                        },
                       ],
                      },
                     ],
                     position: (170, 11),
                    },
                   ],
                   position: (168, 11),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "ExecReload",
                   position: (175, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Expression {
                   expression: PropertyAccess {
                    expression: Variable {
                     identifier: "pkgs",
                     position: (175, 25),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "coreutils",
                       position: (175, 30),
                      },
                     ],
                    },
                    default: None,
                   },
                  },
                  Raw {
                   content: "/bin/kill -HUP $MAINPID",
                   position: (175, 40),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "Restart",
                   position: (176, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "on-failure",
                   position: (176, 20),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (149, 23),
             },
            ),
           ],
           recursive: false,
           position: (143, 33),
          },
         ),
        ],
        recursive: false,
        position: (133, 32),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "meta",
        position: (180, 3),
       },
       Raw {
        content: "maintainers",
        position: (180, 8),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "lib",
       position: (180, 22),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "teams",
         position: (180, 26),
        },
        Raw {
         content: "matrix",
         position: (180, 32),
        },
        Raw {
         content: "members",
         position: (180, 39),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   recursive: false,
   position: (8, 1),
  },
  position: (2, 1),
 },
 position: (1, 1),
}