---
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: (5, 5),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (5, 11),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (5, 18),
        },
        Raw {
         content: "nzbhydra2",
         position: (5, 27),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (8, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (9, 5),
           },
           Raw {
            content: "nzbhydra2",
            position: (9, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (10, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (10, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "NZBHydra2",
                 position: (10, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "dataDir",
               position: (12, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (12, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (13, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (13, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (13, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (14, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/nzbhydra2",
                    position: (14, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (15, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The directory where NZBHydra2 stores its data files.",
                    position: (15, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (12, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "openFirewall",
               position: (18, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (18, 22),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (19, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (19, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (19, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (20, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (20, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Open ports in the firewall for the NZBHydra2 web interface.",
                    position: (22, 12),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (18, 31),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "package",
               position: (25, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (25, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (26, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (26, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "package",
                     position: (26, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (27, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (27, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "nzbhydra2",
                     position: (27, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (28, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (28, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.nzbhydra2",
                      position: (28, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (29, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "NZBHydra2 package to use.",
                    position: (29, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (25, 26),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (9, 26),
         },
        ),
       ],
       recursive: false,
       position: (8, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (34, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (34, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (34, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (34, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (35, 5),
             },
             Raw {
              content: "tmpfiles",
              position: (35, 13),
             },
             Raw {
              content: "rules",
              position: (35, 22),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "d '",
                position: (36, 10),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (36, 15),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "dataDir",
                    position: (36, 19),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "' 0700 nzbhydra2 nzbhydra2 - -",
                position: (36, 27),
               },
              ],
             },
            ],
            position: (36, 7),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (38, 5),
             },
             Raw {
              content: "services",
              position: (38, 13),
             },
             Raw {
              content: "nzbhydra2",
              position: (38, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (39, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "NZBHydra2",
                 position: (39, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (40, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (40, 18),
                  },
                 ],
                },
               ],
               position: (40, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (41, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (41, 21),
                  },
                 ],
                },
               ],
               position: (41, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (43, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (44, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "simple",
                    position: (44, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (45, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "nzbhydra2",
                    position: (45, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (46, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "nzbhydra2",
                    position: (46, 18),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (47, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (48, 14),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (48, 18),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/nzbhydra2 --nobrowser --datafolder '",
                    position: (48, 26),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (48, 69),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "dataDir",
                        position: (48, 73),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "'",
                    position: (48, 81),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (49, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (49, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "NoNewPrivileges",
                    position: (51, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (51, 27),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PrivateTmp",
                    position: (52, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (52, 22),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PrivateDevices",
                    position: (53, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (53, 26),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DevicePolicy",
                    position: (54, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "closed",
                    position: (54, 25),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectSystem",
                    position: (55, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "strict",
                    position: (55, 26),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ReadWritePaths",
                    position: (56, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (56, 26),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "dataDir",
                     position: (56, 30),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectHome",
                    position: (57, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "read-only",
                    position: (57, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectControlGroups",
                    position: (58, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (58, 32),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectKernelModules",
                    position: (59, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (59, 32),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectKernelTunables",
                    position: (60, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (60, 33),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictAddressFamilies",
                    position: (61, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "AF_UNIX AF_INET AF_INET6 AF_NETLINK",
                    position: (61, 35),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictNamespaces",
                    position: (62, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (62, 30),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictRealtime",
                    position: (63, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (63, 28),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictSUIDSGID",
                    position: (64, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (64, 28),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "LockPersonality",
                    position: (65, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (65, 27),
                 },
                ),
               ],
               recursive: false,
               position: (43, 23),
              },
             ),
            ],
            recursive: false,
            position: (38, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "networking",
              position: (69, 5),
             },
             Raw {
              content: "firewall",
              position: (69, 16),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (69, 27),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (69, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "openFirewall",
                 position: (69, 36),
                },
               ],
              },
              default: None,
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "allowedTCPPorts",
                   position: (69, 51),
                  },
                 ],
                },
                List {
                 elements: [
                  Int {
                   value: 5076,
                   position: (69, 71),
                  },
                 ],
                 position: (69, 69),
                },
               ),
              ],
              recursive: false,
              position: (69, 49),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (71, 5),
             },
             Raw {
              content: "users",
              position: (71, 11),
             },
             Raw {
              content: "nzbhydra2",
              position: (71, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "group",
                 position: (72, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "nzbhydra2",
                 position: (72, 16),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "isSystemUser",
                 position: (73, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (73, 22),
              },
             ),
            ],
            recursive: false,
            position: (71, 29),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (76, 5),
             },
             Raw {
              content: "groups",
              position: (76, 11),
             },
             Raw {
              content: "nzbhydra2",
              position: (76, 18),
             },
            ],
           },
           Map {
            bindings: [],
            recursive: false,
            position: (76, 30),
           },
          ),
         ],
         recursive: false,
         position: (34, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (7, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}