---
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: "lidarr",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (9, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (10, 5),
           },
           Raw {
            content: "lidarr",
            position: (10, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (11, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (11, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "Lidarr",
                 position: (11, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "dataDir",
               position: (13, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (13, 17),
             },
             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: "str",
                     position: (14, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (15, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/lidarr/.config/Lidarr",
                    position: (15, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (16, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The directory where Lidarr stores its data files.",
                    position: (16, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (13, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "package",
               position: (19, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (19, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (20, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (20, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "package",
                     position: (20, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (21, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (21, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "lidarr",
                     position: (21, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (22, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (22, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.lidarr",
                      position: (22, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The Lidarr package to use",
                    position: (23, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (19, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "openFirewall",
               position: (26, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 22),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (27, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (27, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (27, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (28, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (28, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (29, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Open ports in the firewall for Lidarr\n",
                    position: (30, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (26, 31),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "user",
               position: (34, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (34, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (35, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (35, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (35, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (36, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "lidarr",
                    position: (36, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (37, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "User account under which Lidarr runs.\n",
                    position: (38, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (34, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "group",
               position: (42, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (42, 15),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (43, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (43, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (43, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (44, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "lidarr",
                    position: (44, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (45, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Group under which Lidarr runs.\n",
                    position: (46, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (42, 24),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (10, 23),
         },
        ),
       ],
       recursive: false,
       position: (9, 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: "systemd",
              position: (53, 5),
             },
             Raw {
              content: "tmpfiles",
              position: (53, 13),
             },
             Raw {
              content: "rules",
              position: (53, 22),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "d '",
                position: (54, 8),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (54, 13),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "dataDir",
                    position: (54, 17),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "' 0700 ",
                position: (54, 25),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (54, 34),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "user",
                    position: (54, 38),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " ",
                position: (54, 43),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (54, 46),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "group",
                    position: (54, 50),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " - -",
                position: (54, 56),
               },
              ],
             },
            ],
            position: (53, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (57, 5),
             },
             Raw {
              content: "services",
              position: (57, 13),
             },
             Raw {
              content: "lidarr",
              position: (57, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (58, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Lidarr",
                 position: (58, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (59, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (59, 18),
                  },
                 ],
                },
               ],
               position: (59, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (60, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (60, 21),
                  },
                 ],
                },
               ],
               position: (60, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (62, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (63, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "simple",
                    position: (63, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (64, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (64, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (64, 20),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (65, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (65, 17),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (65, 21),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (66, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (66, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (66, 28),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/Lidarr -nobrowser -data='",
                    position: (66, 36),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (66, 68),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "dataDir",
                        position: (66, 72),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "'",
                    position: (66, 80),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (67, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (67, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (62, 23),
              },
             ),
            ],
            recursive: false,
            position: (57, 31),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "networking",
              position: (71, 5),
             },
             Raw {
              content: "firewall",
              position: (71, 16),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (71, 27),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (71, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "openFirewall",
                 position: (71, 36),
                },
               ],
              },
              default: None,
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "allowedTCPPorts",
                   position: (72, 7),
                  },
                 ],
                },
                List {
                 elements: [
                  Int {
                   value: 8686,
                   position: (72, 27),
                  },
                 ],
                 position: (72, 25),
                },
               ),
              ],
              recursive: false,
              position: (71, 49),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (75, 5),
             },
             Raw {
              content: "users",
              position: (75, 11),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (75, 19),
            },
            arguments: [
             BinaryOperation {
              operator: EqualTo,
              operands: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (75, 25),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "user",
                   position: (75, 29),
                  },
                 ],
                },
                default: None,
               },
               String {
                parts: [
                 Raw {
                  content: "lidarr",
                  position: (75, 38),
                 },
                ],
               },
              ],
              position: (75, 34),
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "lidarr",
                   position: (76, 7),
                  },
                 ],
                },
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "group",
                      position: (77, 9),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (77, 17),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "group",
                       position: (77, 21),
                      },
                     ],
                    },
                    default: None,
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "home",
                      position: (78, 9),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "/var/lib/lidarr",
                      position: (78, 17),
                     },
                    ],
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "uid",
                      position: (79, 9),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "config",
                     position: (79, 15),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "ids",
                       position: (79, 22),
                      },
                      Raw {
                       content: "uids",
                       position: (79, 26),
                      },
                      Raw {
                       content: "lidarr",
                       position: (79, 31),
                      },
                     ],
                    },
                    default: None,
                   },
                  ),
                 ],
                 recursive: false,
                 position: (76, 16),
                },
               ),
              ],
              recursive: false,
              position: (75, 47),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (83, 5),
             },
             Raw {
              content: "groups",
              position: (83, 11),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (83, 20),
            },
            arguments: [
             BinaryOperation {
              operator: EqualTo,
              operands: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (83, 26),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "group",
                   position: (83, 30),
                  },
                 ],
                },
                default: None,
               },
               String {
                parts: [
                 Raw {
                  content: "lidarr",
                  position: (83, 40),
                 },
                ],
               },
              ],
              position: (83, 36),
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "lidarr",
                   position: (84, 7),
                  },
                 ],
                },
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "gid",
                      position: (85, 9),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "config",
                     position: (85, 15),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "ids",
                       position: (85, 22),
                      },
                      Raw {
                       content: "gids",
                       position: (85, 26),
                      },
                      Raw {
                       content: "lidarr",
                       position: (85, 31),
                      },
                     ],
                    },
                    default: None,
                   },
                  ),
                 ],
                 recursive: false,
                 position: (84, 16),
                },
               ),
              ],
              recursive: false,
              position: (83, 49),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (52, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}