---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "prowlarr",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (10, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "services",
            position: (11, 5),
           },
           Raw {
            content: "prowlarr",
            position: (11, 14),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "enable",
               position: (12, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (12, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "Prowlarr",
                 position: (12, 32),
                },
               ],
               position: (12, 31),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "openFirewall",
               position: (14, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (14, 22),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (15, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (15, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "bool",
                     position: (15, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (16, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "false",
                  position: (16, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (17, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Open ports in the firewall for the Prowlarr web interface.",
                    position: (17, 24),
                   },
                  ],
                  position: (17, 23),
                 },
                },
               ],
               recursive: false,
               position: (14, 31),
              },
             ],
            },
           },
          ],
          recursive: false,
          position: (11, 25),
         },
        },
       ],
       recursive: false,
       position: (10, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (22, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (22, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (22, 17),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (22, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "systemd",
              position: (23, 5),
             },
             Raw {
              content: "services",
              position: (23, 13),
             },
             Raw {
              content: "prowlarr",
              position: (23, 22),
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (24, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "Prowlarr",
                 position: (24, 22),
                },
               ],
               position: (24, 21),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "after",
                 position: (25, 7),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (25, 18),
                  },
                 ],
                 position: (25, 17),
                },
               ],
               position: (25, 15),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "wantedBy",
                 position: (26, 7),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (26, 21),
                  },
                 ],
                 position: (26, 20),
                },
               ],
               position: (26, 18),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "serviceConfig",
                 position: (28, 7),
                },
               ],
              },
              to: Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "Type",
                    position: (29, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "simple",
                    position: (29, 17),
                   },
                  ],
                  position: (29, 16),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "DynamicUser",
                    position: (30, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "true",
                  position: (30, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "StateDirectory",
                    position: (31, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "prowlarr",
                    position: (31, 27),
                   },
                  ],
                  position: (31, 26),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "ExecStart",
                    position: (32, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Interpolation {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (32, 24),
                     },
                     attribute_path: AttributePath {
                      parts: [
                       Raw {
                        content: "prowlarr",
                        position: (32, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/Prowlarr -nobrowser -data=/var/lib/prowlarr",
                    position: (32, 38),
                   },
                  ],
                  position: (32, 21),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "Restart",
                    position: (33, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (33, 20),
                   },
                  ],
                  position: (33, 19),
                 },
                },
               ],
               recursive: false,
               position: (28, 23),
              },
             },
            ],
            recursive: false,
            position: (23, 33),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "networking",
              position: (37, 5),
             },
             Raw {
              content: "firewall",
              position: (37, 16),
             },
            ],
           },
           to: FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (37, 27),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (37, 32),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "openFirewall",
                 position: (37, 36),
                },
               ],
              },
              default: None,
             },
             Map {
              bindings: [
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "allowedTCPPorts",
                   position: (38, 7),
                  },
                 ],
                },
                to: List {
                 elements: [
                  Int {
                   value: 9696,
                   position: (38, 27),
                  },
                 ],
                 position: (38, 25),
                },
               },
              ],
              recursive: false,
              position: (37, 49),
             },
            ],
           },
          },
         ],
         recursive: false,
         position: (22, 28),
        },
       ],
      },
     },
    ],
    recursive: false,
    position: (9, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}