---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "leaps",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "stateDir",
        position: (7, 3),
       },
      ],
     },
     String {
      parts: [
       Raw {
        content: "/var/lib/leaps/",
        position: (7, 15),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (10, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (11, 5),
           },
           Raw {
            content: "leaps",
            position: (11, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (12, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (12, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "leaps",
                 position: (12, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (13, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (13, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (14, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (14, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "port",
                     position: (14, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (15, 9),
                   },
                  ],
                 },
                 Int {
                  value: 8080,
                  position: (15, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (16, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "A port where leaps listens for incoming http requests",
                    position: (16, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (13, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "address",
               position: (18, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (18, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (19, 9),
                   },
                  ],
                 },
                 String {
                  parts: [],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (20, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (20, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (20, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "127.0.0.1",
                    position: (21, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (22, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Hostname or IP-address to listen to. By default it will listen on all interfaces.",
                    position: (22, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (18, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "path",
               position: (24, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (24, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (25, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/",
                    position: (25, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (26, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (26, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "path",
                     position: (26, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (27, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Subdirectory used for reverse proxy setups",
                    position: (27, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (24, 23),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (11, 22),
         },
        ),
       ],
       recursive: false,
       position: (10, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (32, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (32, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (32, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (32, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (33, 5),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "users",
                 position: (34, 7),
                },
                Raw {
                 content: "leaps",
                 position: (34, 13),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "uid",
                    position: (35, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "config",
                   position: (35, 27),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "ids",
                     position: (35, 34),
                    },
                    Raw {
                     content: "uids",
                     position: (35, 38),
                    },
                    Raw {
                     content: "leaps",
                     position: (35, 43),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (36, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Leaps server user",
                    position: (36, 28),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "group",
                    position: (37, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "leaps",
                    position: (37, 28),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "home",
                    position: (38, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "stateDir",
                  position: (38, 27),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "createHome",
                    position: (39, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (39, 27),
                 },
                ),
               ],
               recursive: false,
               position: (34, 21),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "groups",
                 position: (42, 7),
                },
                Raw {
                 content: "leaps",
                 position: (42, 14),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "gid",
                    position: (43, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "config",
                   position: (43, 15),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "ids",
                     position: (43, 22),
                    },
                    Raw {
                     content: "gids",
                     position: (43, 26),
                    },
                    Raw {
                     content: "leaps",
                     position: (43, 31),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (42, 22),
              },
             ),
            ],
            recursive: false,
            position: (33, 13),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (47, 5),
             },
             Raw {
              content: "services",
              position: (47, 13),
             },
             Raw {
              content: "leaps",
              position: (47, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (48, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "leaps service",
                 position: (48, 24),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (49, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (49, 26),
                  },
                 ],
                },
               ],
               position: (49, 23),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (50, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (50, 26),
                  },
                 ],
                },
               ],
               position: (50, 23),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (52, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (53, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "leaps",
                    position: (53, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (54, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "leaps",
                    position: (54, 18),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (55, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (55, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "WorkingDirectory",
                    position: (56, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "stateDir",
                  position: (56, 28),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PrivateTmp",
                    position: (57, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (57, 22),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (58, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (58, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "leaps",
                        position: (58, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/leaps -path ",
                    position: (58, 35),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: Variable {
                      identifier: "toString",
                      position: (58, 54),
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (58, 63),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "path",
                          position: (58, 67),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   },
                   Raw {
                    content: " -address ",
                    position: (58, 72),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (58, 84),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "address",
                        position: (58, 88),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: ":",
                    position: (58, 96),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: Variable {
                      identifier: "toString",
                      position: (58, 99),
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (58, 108),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "port",
                          position: (58, 112),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (52, 23),
              },
             ),
            ],
            recursive: false,
            position: (47, 30),
           },
          ),
         ],
         recursive: false,
         position: (32, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (9, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}