---
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: (5, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (5, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (5, 16),
        },
        Raw {
         content: "jmusicbot",
         position: (5, 25),
        },
       ],
      },
      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: "jmusicbot",
            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: "jmusicbot, a Discord music bot that's easy to set up and run yourself",
                 position: (10, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "package",
               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: "package",
                     position: (13, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (14, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (14, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "jmusicbot",
                     position: (14, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (15, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (15, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.jmusicbot",
                      position: (15, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (16, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "JMusicBot package to use",
                    position: (16, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (12, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "stateDir",
               position: (19, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (19, 18),
             },
             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: "path",
                     position: (20, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The directory where config.txt and serversettings.json is saved.\nIf left as the default value this directory will automatically be created before JMusicBot starts, otherwise the sysadmin is responsible for ensuring the directory exists with appropriate ownership and permissions.\nUntouched by the value of this option config.txt needs to be placed manually into this directory.\n",
                    position: (22, 1),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (26, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/jmusicbot/",
                    position: (26, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (19, 27),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (9, 26),
         },
        ),
       ],
       recursive: false,
       position: (8, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (31, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (31, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (31, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (31, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (32, 5),
             },
             Raw {
              content: "services",
              position: (32, 13),
             },
             Raw {
              content: "jmusicbot",
              position: (32, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (33, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (33, 21),
                  },
                 ],
                },
               ],
               position: (33, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (34, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network-online.target",
                   position: (34, 18),
                  },
                 ],
                },
               ],
               position: (34, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (35, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Discord music bot that's easy to set up and run yourself!",
                 position: (35, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (36, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "mkMerge",
                position: (36, 23),
               },
               arguments: [
                List {
                 elements: [
                  Map {
                   bindings: [
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "ExecStart",
                        position: (37, 9),
                       },
                      ],
                     },
                     String {
                      parts: [
                       Expression {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (37, 24),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "package",
                            position: (37, 28),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                       Raw {
                        content: "/bin/JMusicBot",
                        position: (37, 36),
                       },
                      ],
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "WorkingDirectory",
                        position: (38, 9),
                       },
                      ],
                     },
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (38, 28),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "stateDir",
                         position: (38, 32),
                        },
                       ],
                      },
                      default: None,
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "Restart",
                        position: (39, 9),
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "always",
                        position: (39, 20),
                       },
                      ],
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "RestartSec",
                        position: (40, 9),
                       },
                      ],
                     },
                     Int {
                      value: 20,
                      position: (40, 22),
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "DynamicUser",
                        position: (41, 9),
                       },
                      ],
                     },
                     Variable {
                      identifier: "true",
                      position: (41, 23),
                     },
                    ),
                   ],
                   recursive: false,
                   position: (36, 32),
                  },
                  FunctionApplication {
                   function: Variable {
                    identifier: "mkIf",
                    position: (43, 10),
                   },
                   arguments: [
                    BinaryOperation {
                     operator: EqualTo,
                     operands: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (43, 16),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "stateDir",
                          position: (43, 20),
                         },
                        ],
                       },
                       default: None,
                      },
                      String {
                       parts: [
                        Raw {
                         content: "/var/lib/jmusicbot",
                         position: (43, 33),
                        },
                       ],
                      },
                     ],
                     position: (43, 29),
                    },
                    Map {
                     bindings: [
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "StateDirectory",
                          position: (43, 56),
                         },
                        ],
                       },
                       String {
                        parts: [
                         Raw {
                          content: "jmusicbot",
                          position: (43, 74),
                         },
                        ],
                       },
                      ),
                     ],
                     recursive: false,
                     position: (43, 54),
                    },
                   ],
                  },
                 ],
                 position: (36, 31),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (32, 34),
           },
          ),
         ],
         recursive: false,
         position: (31, 28),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (47, 3),
        },
        Raw {
         content: "maintainers",
         position: (47, 8),
        },
       ],
      },
      With {
       expression: Variable {
        identifier: "maintainers",
        position: (47, 27),
       },
       target: List {
        elements: [
         Variable {
          identifier: "SuperSandro2000",
          position: (47, 42),
         },
        ],
        position: (47, 40),
       },
       position: (47, 22),
      },
     ),
    ],
    recursive: false,
    position: (7, 1),
   },
   position: (4, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}