---
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: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "beanstalkd",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "pkg",
        position: (7, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "pkgs",
       position: (7, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "beanstalkd",
         position: (7, 14),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (13, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (14, 5),
           },
           Raw {
            content: "beanstalkd",
            position: (14, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (15, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (15, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "the Beanstalk work queue",
                 position: (15, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "listen",
               position: (17, 7),
              },
             ],
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "port",
                  position: (18, 9),
                 },
                ],
               },
               FunctionApplication {
                function: Variable {
                 identifier: "mkOption",
                 position: (18, 16),
                },
                arguments: [
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "type",
                       position: (19, 11),
                      },
                     ],
                    },
                    PropertyAccess {
                     expression: Variable {
                      identifier: "types",
                      position: (19, 18),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "int",
                        position: (19, 24),
                       },
                      ],
                     },
                     default: None,
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "description",
                       position: (20, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "TCP port that will be used to accept client connections.",
                       position: (20, 26),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "default",
                       position: (21, 11),
                      },
                     ],
                    },
                    Int {
                     value: 11300,
                     position: (21, 21),
                    },
                   ),
                  ],
                  recursive: false,
                  position: (18, 25),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "address",
                  position: (24, 9),
                 },
                ],
               },
               FunctionApplication {
                function: Variable {
                 identifier: "mkOption",
                 position: (24, 19),
                },
                arguments: [
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "type",
                       position: (25, 11),
                      },
                     ],
                    },
                    PropertyAccess {
                     expression: Variable {
                      identifier: "types",
                      position: (25, 18),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "str",
                        position: (25, 24),
                       },
                      ],
                     },
                     default: None,
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "description",
                       position: (26, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "IP address to listen on.",
                       position: (26, 26),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "default",
                       position: (27, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "127.0.0.1",
                       position: (27, 22),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "example",
                       position: (28, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "0.0.0.0",
                       position: (28, 22),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (24, 28),
                 },
                ],
               },
              ),
             ],
             recursive: false,
             position: (17, 16),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "openFirewall",
               position: (32, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (32, 22),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (33, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (33, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (33, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (34, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (34, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (35, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Whether to open ports in the firewall for the server.",
                    position: (35, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (32, 31),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (14, 27),
         },
        ),
       ],
       recursive: false,
       position: (13, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (42, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (42, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (42, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (42, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "networking",
              position: (44, 5),
             },
             Raw {
              content: "firewall",
              position: (44, 16),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (44, 27),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (44, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "openFirewall",
                 position: (44, 36),
                },
               ],
              },
              default: None,
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "allowedTCPPorts",
                   position: (45, 7),
                  },
                 ],
                },
                List {
                 elements: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (45, 27),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "listen",
                      position: (45, 31),
                     },
                     Raw {
                      content: "port",
                      position: (45, 38),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                 position: (45, 25),
                },
               ),
              ],
              recursive: false,
              position: (44, 49),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (48, 5),
             },
             Raw {
              content: "systemPackages",
              position: (48, 17),
             },
            ],
           },
           List {
            elements: [
             Variable {
              identifier: "pkg",
              position: (48, 36),
             },
            ],
            position: (48, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (50, 5),
             },
             Raw {
              content: "services",
              position: (50, 13),
             },
             Raw {
              content: "beanstalkd",
              position: (50, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (51, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Beanstalk Work Queue",
                 position: (51, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (52, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (52, 18),
                  },
                 ],
                },
               ],
               position: (52, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (53, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (53, 21),
                  },
                 ],
                },
               ],
               position: (53, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (54, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DynamicUser",
                    position: (55, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (55, 23),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (56, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "always",
                    position: (56, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (57, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: Variable {
                     identifier: "pkg",
                     position: (57, 24),
                    },
                   },
                   Raw {
                    content: "/bin/beanstalkd -l ",
                    position: (57, 28),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (57, 49),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "listen",
                        position: (57, 53),
                       },
                       Raw {
                        content: "address",
                        position: (57, 60),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: " -p ",
                    position: (57, 68),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: Variable {
                      identifier: "toString",
                      position: (57, 74),
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (57, 83),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "listen",
                          position: (57, 87),
                         },
                         Raw {
                          content: "port",
                          position: (57, 94),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   },
                   Raw {
                    content: " -b $STATE_DIRECTORY",
                    position: (57, 99),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "StateDirectory",
                    position: (58, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "beanstalkd",
                    position: (58, 27),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (54, 23),
              },
             ),
            ],
            recursive: false,
            position: (50, 35),
           },
          ),
         ],
         recursive: false,
         position: (42, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (10, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}