---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (5, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (5, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (5, 16),
        },
        Raw {
         content: "pantalaimon-headless",
         position: (5, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "iniFmt",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 12),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "formats",
          position: (7, 17),
         },
         Raw {
          content: "ini",
          position: (7, 25),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [],
        recursive: false,
        position: (7, 29),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "mkConfigFile",
        position: (9, 3),
       },
      ],
     },
     Function {
      argument: Some(
       "name",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: Function {
       argument: Some(
        "instanceConfig",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "iniFmt",
          position: (9, 40),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "generate",
            position: (9, 47),
           },
          ],
         },
         default: None,
        },
        arguments: [
         String {
          parts: [
           Raw {
            content: "pantalaimon.conf",
            position: (9, 57),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "Default",
               position: (10, 5),
              },
             ],
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "LogLevel",
                  position: (11, 7),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "instanceConfig",
                 position: (11, 18),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "logLevel",
                   position: (11, 33),
                  },
                 ],
                },
                default: None,
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "Notifications",
                  position: (12, 7),
                 },
                ],
               },
               Variable {
                identifier: "false",
                position: (12, 23),
               },
              ),
             ],
             recursive: false,
             position: (10, 15),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Expression {
               expression: Variable {
                identifier: "name",
                position: (15, 7),
               },
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "recursiveUpdate",
              position: (15, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Homeserver",
                    position: (17, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "instanceConfig",
                   position: (17, 22),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "homeserver",
                     position: (17, 37),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ListenAddress",
                    position: (18, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "instanceConfig",
                   position: (18, 25),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "listenAddress",
                     position: (18, 40),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ListenPort",
                    position: (19, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "instanceConfig",
                   position: (19, 22),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "listenPort",
                     position: (19, 37),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "SSL",
                    position: (20, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "instanceConfig",
                   position: (20, 15),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "ssl",
                     position: (20, 30),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "IgnoreVerification",
                    position: (23, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (23, 30),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "UseKeyring",
                    position: (24, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (24, 22),
                 },
                ),
               ],
               recursive: false,
               position: (16, 7),
              },
              PropertyAccess {
               expression: Variable {
                identifier: "instanceConfig",
                position: (26, 7),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "extraSettings",
                  position: (26, 22),
                 },
                ],
               },
               default: None,
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (9, 75),
         },
        ],
       },
       position: (9, 24),
      },
      position: (9, 18),
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "mkPantalaimonService",
        position: (30, 3),
       },
      ],
     },
     Function {
      argument: Some(
       "name",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: Function {
       argument: Some(
        "instanceConfig",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: FunctionApplication {
        function: Variable {
         identifier: "nameValuePair",
         position: (31, 5),
        },
        arguments: [
         String {
          parts: [
           Raw {
            content: "pantalaimon-",
            position: (31, 20),
           },
           Expression {
            expression: Variable {
             identifier: "name",
             position: (31, 34),
            },
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "description",
               position: (32, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "pantalaimon instance ",
               position: (32, 22),
              },
              Expression {
               expression: Variable {
                identifier: "name",
                position: (32, 45),
               },
              },
              Raw {
               content: " - E2EE aware proxy daemon for matrix clients",
               position: (32, 50),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "wants",
               position: (33, 7),
              },
             ],
            },
            List {
             elements: [
              String {
               parts: [
                Raw {
                 content: "network-online.target",
                 position: (33, 18),
                },
               ],
              },
             ],
             position: (33, 15),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "after",
               position: (34, 7),
              },
             ],
            },
            List {
             elements: [
              String {
               parts: [
                Raw {
                 content: "network-online.target",
                 position: (34, 18),
                },
               ],
              },
             ],
             position: (34, 15),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "wantedBy",
               position: (35, 7),
              },
             ],
            },
            List {
             elements: [
              String {
               parts: [
                Raw {
                 content: "multi-user.target",
                 position: (35, 21),
                },
               ],
              },
             ],
             position: (35, 18),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "serviceConfig",
               position: (37, 7),
              },
             ],
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "ExecStart",
                  position: (38, 9),
                 },
                ],
               },
               String {
                parts: [
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "pkgs",
                    position: (38, 25),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "pantalaimon-headless",
                      position: (38, 30),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                 Raw {
                  content: "/bin/pantalaimon --config ",
                  position: (38, 51),
                 },
                 Expression {
                  expression: FunctionApplication {
                   function: Variable {
                    identifier: "mkConfigFile",
                    position: (38, 79),
                   },
                   arguments: [
                    Variable {
                     identifier: "name",
                     position: (38, 92),
                    },
                    Variable {
                     identifier: "instanceConfig",
                     position: (38, 97),
                    },
                   ],
                  },
                 },
                 Raw {
                  content: " --data-path ",
                  position: (38, 112),
                 },
                 Expression {
                  expression: PropertyAccess {
                   expression: Variable {
                    identifier: "instanceConfig",
                    position: (38, 127),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "dataPath",
                      position: (38, 142),
                     },
                    ],
                   },
                   default: None,
                  },
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "Restart",
                  position: (39, 9),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "on-failure",
                  position: (39, 20),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "DynamicUser",
                  position: (40, 9),
                 },
                ],
               },
               Variable {
                identifier: "true",
                position: (40, 23),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "NoNewPrivileges",
                  position: (41, 9),
                 },
                ],
               },
               Variable {
                identifier: "true",
                position: (41, 27),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "PrivateDevices",
                  position: (42, 9),
                 },
                ],
               },
               Variable {
                identifier: "true",
                position: (42, 26),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "PrivateTmp",
                  position: (43, 9),
                 },
                ],
               },
               Variable {
                identifier: "true",
                position: (43, 22),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "ProtectHome",
                  position: (44, 9),
                 },
                ],
               },
               Variable {
                identifier: "true",
                position: (44, 23),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "ProtectSystem",
                  position: (45, 9),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "strict",
                  position: (45, 26),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "StateDirectory",
                  position: (46, 9),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "pantalaimon-",
                  position: (46, 27),
                 },
                 Expression {
                  expression: Variable {
                   identifier: "name",
                   position: (46, 41),
                  },
                 },
                ],
               },
              ),
             ],
             recursive: false,
             position: (37, 23),
            },
           ),
          ],
          recursive: false,
          position: (31, 41),
         },
        ],
       },
       position: (30, 32),
      },
      position: (30, 26),
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (51, 3),
        },
        Raw {
         content: "services",
         position: (51, 11),
        },
        Raw {
         content: "pantalaimon-headless",
         position: (51, 20),
        },
        Raw {
         content: "instances",
         position: (51, 41),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkOption",
        position: (51, 53),
       },
       arguments: [
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "default",
              position: (52, 5),
             },
            ],
           },
           Map {
            bindings: [],
            recursive: false,
            position: (52, 15),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "type",
              position: (53, 5),
             },
            ],
           },
           FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "types",
              position: (53, 12),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "attrsOf",
                position: (53, 18),
               },
              ],
             },
             default: None,
            },
            arguments: [
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (53, 27),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "submodule",
                  position: (53, 33),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               FunctionApplication {
                function: Variable {
                 identifier: "import",
                 position: (53, 44),
                },
                arguments: [
                 Path {
                  parts: [
                   Raw {
                    content: "./pantalaimon-options.nix",
                    position: (53, 51),
                   },
                  ],
                 },
                ],
               },
              ],
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "description",
              position: (54, 5),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "Declarative instance config.\n\nNote: to use pantalaimon interactively, e.g. for a Matrix client which does not\nsupport End-to-end encryption (like <literal>fractal</literal>), refer to the home-manager module.\n",
              position: (55, 1),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (51, 62),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (62, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (62, 12),
       },
       arguments: [
        BinaryOperation {
         operator: NotEqualTo,
         operands: [
          PropertyAccess {
           expression: Variable {
            identifier: "config",
            position: (62, 18),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (62, 25),
             },
             Raw {
              content: "pantalaimon-headless",
              position: (62, 34),
             },
             Raw {
              content: "instances",
              position: (62, 55),
             },
            ],
           },
           default: None,
          },
          Map {
           bindings: [],
           recursive: false,
           position: (62, 68),
          },
         ],
         position: (62, 65),
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (64, 7),
             },
             Raw {
              content: "services",
              position: (64, 15),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mapAttrs'",
             position: (64, 26),
            },
            arguments: [
             Variable {
              identifier: "mkPantalaimonService",
              position: (64, 36),
             },
             PropertyAccess {
              expression: Variable {
               identifier: "config",
               position: (64, 57),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "services",
                 position: (64, 64),
                },
                Raw {
                 content: "pantalaimon-headless",
                 position: (64, 73),
                },
                Raw {
                 content: "instances",
                 position: (64, 94),
                },
               ],
              },
              default: None,
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (63, 5),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (67, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "maintainers",
            position: (68, 5),
           },
          ],
         },
         With {
          expression: Variable {
           identifier: "maintainers",
           position: (68, 24),
          },
          target: List {
           elements: [
            Variable {
             identifier: "jojosch",
             position: (68, 39),
            },
           ],
           position: (68, 37),
          },
          position: (68, 19),
         },
        ),
       ],
       recursive: false,
       position: (67, 10),
      },
     ),
    ],
    recursive: false,
    position: (50, 1),
   },
   position: (4, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}