---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: LetIn {
  bindings: [
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "cfg",
       position: (4, 3),
      },
     ],
    },
    PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (4, 9),
     },
     attribute_path: AttributePath {
      attributes: [
       Raw {
        content: "services",
        position: (4, 16),
       },
       Raw {
        content: "mailcatcher",
        position: (4, 25),
       },
      ],
     },
     default: None,
    },
   ),
   Inherit(
    Some(
     Variable {
      identifier: "lib",
      position: (6, 12),
     },
    ),
    [
     Raw {
      content: "mkEnableOption",
      position: (6, 17),
     },
     Raw {
      content: "mkIf",
      position: (6, 32),
     },
     Raw {
      content: "mkOption",
      position: (6, 37),
     },
     Raw {
      content: "types",
      position: (6, 46),
     },
     Raw {
      content: "optionalString",
      position: (6, 52),
     },
    ],
   ),
  ],
  target: Map {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "options",
        position: (11, 3),
       },
      ],
     },
     Map {
      bindings: [
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "services",
           position: (13, 5),
          },
          Raw {
           content: "mailcatcher",
           position: (13, 14),
          },
         ],
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "enable",
              position: (14, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkEnableOption",
             position: (14, 16),
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: "MailCatcher",
                position: (14, 32),
               },
              ],
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "http",
              position: (16, 7),
             },
             Raw {
              content: "ip",
              position: (16, 12),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (16, 17),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (17, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (17, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (17, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (18, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "127.0.0.1",
                   position: (18, 20),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (19, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "The ip address of the http server.",
                   position: (19, 24),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (16, 26),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "http",
              position: (22, 7),
             },
             Raw {
              content: "port",
              position: (22, 12),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (22, 19),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (23, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (23, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "port",
                    position: (23, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (24, 9),
                  },
                 ],
                },
                Int {
                 value: 1080,
                 position: (24, 19),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (25, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "The port address of the http server.",
                   position: (25, 24),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (22, 28),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "http",
              position: (28, 7),
             },
             Raw {
              content: "path",
              position: (28, 12),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (28, 19),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (29, 9),
                  },
                 ],
                },
                With {
                 expression: Variable {
                  identifier: "types",
                  position: (29, 21),
                 },
                 target: FunctionApplication {
                  function: Variable {
                   identifier: "nullOr",
                   position: (29, 28),
                  },
                  arguments: [
                   Variable {
                    identifier: "str",
                    position: (29, 35),
                   },
                  ],
                 },
                 position: (29, 16),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (30, 9),
                  },
                 ],
                },
                Variable {
                 identifier: "null",
                 position: (30, 19),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (31, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "Prefix to all HTTP paths.",
                   position: (31, 24),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "example",
                   position: (32, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "/mailcatcher",
                   position: (32, 20),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (28, 28),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "smtp",
              position: (35, 7),
             },
             Raw {
              content: "ip",
              position: (35, 12),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (35, 17),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (36, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (36, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (36, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (37, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "127.0.0.1",
                   position: (37, 20),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (38, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "The ip address of the smtp server.",
                   position: (38, 24),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (35, 26),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "smtp",
              position: (41, 7),
             },
             Raw {
              content: "port",
              position: (41, 12),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (41, 19),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (42, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (42, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "port",
                    position: (42, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (43, 9),
                  },
                 ],
                },
                Int {
                 value: 1025,
                 position: (43, 19),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (44, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "The port address of the smtp server.",
                   position: (44, 24),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (41, 28),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (13, 28),
        },
       ),
      ],
      recursive: false,
      position: (11, 13),
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "config",
        position: (52, 3),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "mkIf",
       position: (52, 12),
      },
      arguments: [
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (52, 17),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "enable",
           position: (52, 21),
          },
         ],
        },
        default: None,
       },
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "environment",
             position: (53, 5),
            },
            Raw {
             content: "systemPackages",
             position: (53, 17),
            },
           ],
          },
          List {
           elements: [
            PropertyAccess {
             expression: Variable {
              identifier: "pkgs",
              position: (53, 36),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "mailcatcher",
                position: (53, 41),
               },
              ],
             },
             default: None,
            },
           ],
           position: (53, 34),
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "systemd",
             position: (55, 5),
            },
            Raw {
             content: "services",
             position: (55, 13),
            },
            Raw {
             content: "mailcatcher",
             position: (55, 22),
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (56, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "MailCatcher Service",
                position: (56, 22),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "after",
                position: (57, 7),
               },
              ],
             },
             List {
              elements: [
               String {
                parts: [
                 Raw {
                  content: "network.target",
                  position: (57, 18),
                 },
                ],
               },
              ],
              position: (57, 15),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "wantedBy",
                position: (58, 7),
               },
              ],
             },
             List {
              elements: [
               String {
                parts: [
                 Raw {
                  content: "multi-user.target",
                  position: (58, 21),
                 },
                ],
               },
              ],
              position: (58, 18),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "serviceConfig",
                position: (60, 7),
               },
              ],
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "DynamicUser",
                   position: (61, 9),
                  },
                 ],
                },
                Variable {
                 identifier: "true",
                 position: (61, 23),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "Restart",
                   position: (62, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "always",
                   position: (62, 20),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "ExecStart",
                   position: (63, 9),
                  },
                 ],
                },
                BinaryOperation {
                 operator: Addition,
                 operands: [
                  String {
                   parts: [
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "pkgs",
                       position: (63, 24),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "mailcatcher",
                         position: (63, 29),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: "/bin/mailcatcher --foreground --no-quit --http-ip ",
                     position: (63, 41),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (63, 93),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "http",
                         position: (63, 97),
                        },
                        Raw {
                         content: "ip",
                         position: (63, 102),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: " --http-port ",
                     position: (63, 105),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "toString",
                       position: (63, 120),
                      },
                      arguments: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (63, 129),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "http",
                           position: (63, 133),
                          },
                          Raw {
                           content: "port",
                           position: (63, 138),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                    Raw {
                     content: " --smtp-ip ",
                     position: (63, 143),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (63, 156),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "smtp",
                         position: (63, 160),
                        },
                        Raw {
                         content: "ip",
                         position: (63, 165),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: " --smtp-port ",
                     position: (63, 168),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "toString",
                       position: (63, 183),
                      },
                      arguments: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (63, 192),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "smtp",
                           position: (63, 196),
                          },
                          Raw {
                           content: "port",
                           position: (63, 201),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                   ],
                  },
                  FunctionApplication {
                   function: Variable {
                    identifier: "optionalString",
                    position: (63, 210),
                   },
                   arguments: [
                    BinaryOperation {
                     operator: NotEqualTo,
                     operands: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (63, 226),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "http",
                          position: (63, 230),
                         },
                         Raw {
                          content: "path",
                          position: (63, 235),
                         },
                        ],
                       },
                       default: None,
                      },
                      Variable {
                       identifier: "null",
                       position: (63, 243),
                      },
                     ],
                     position: (63, 240),
                    },
                    String {
                     parts: [
                      Raw {
                       content: " --http-path ",
                       position: (63, 250),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (63, 265),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "http",
                           position: (63, 269),
                          },
                          Raw {
                           content: "path",
                           position: (63, 274),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                     ],
                    },
                   ],
                  },
                 ],
                 position: (63, 208),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "AmbientCapabilities",
                   position: (64, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "optionalString",
                  position: (64, 31),
                 },
                 arguments: [
                  BinaryOperation {
                   operator: LogicalOr,
                   operands: [
                    BinaryOperation {
                     operator: LessThan,
                     operands: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (64, 47),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "http",
                          position: (64, 51),
                         },
                         Raw {
                          content: "port",
                          position: (64, 56),
                         },
                        ],
                       },
                       default: None,
                      },
                      Int {
                       value: 1024,
                       position: (64, 63),
                      },
                     ],
                     position: (64, 61),
                    },
                    BinaryOperation {
                     operator: LessThan,
                     operands: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (64, 71),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "smtp",
                          position: (64, 75),
                         },
                         Raw {
                          content: "port",
                          position: (64, 80),
                         },
                        ],
                       },
                       default: None,
                      },
                      Int {
                       value: 1024,
                       position: (64, 87),
                      },
                     ],
                     position: (64, 85),
                    },
                   ],
                   position: (64, 68),
                  },
                  String {
                   parts: [
                    Raw {
                     content: "cap_net_bind_service",
                     position: (64, 94),
                    },
                   ],
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (60, 23),
             },
            ),
           ],
           recursive: false,
           position: (55, 36),
          },
         ),
        ],
        recursive: false,
        position: (52, 28),
       },
      ],
     },
    ),
   ],
   recursive: false,
   position: (8, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}