---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "navidrome",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "settingsFormat",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 20),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "formats",
          position: (7, 25),
         },
         Raw {
          content: "json",
          position: (7, 33),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [],
        recursive: false,
        position: (7, 38),
       },
      ],
     },
    ),
   ],
   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: "navidrome",
            position: (10, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (12, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (12, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "Navidrome music server",
                 position: (12, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "settings",
               position: (14, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (14, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (15, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "settingsFormat",
                   position: (15, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (15, 31),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "apply",
                    position: (16, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "recursiveUpdate",
                   position: (16, 17),
                  },
                  arguments: [
                   Variable {
                    identifier: "default",
                    position: (16, 33),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (17, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "Address",
                       position: (18, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "127.0.0.1",
                       position: (18, 22),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "Port",
                       position: (19, 11),
                      },
                     ],
                    },
                    Int {
                     value: 4533,
                     position: (19, 18),
                    },
                   ),
                  ],
                  recursive: false,
                  position: (17, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (21, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "MusicFolder",
                       position: (22, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "/mnt/music",
                       position: (22, 26),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (21, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (24, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Configuration for Navidrome, see <link xlink:href=\"https://www.navidrome.org/docs/usage/configuration-options/\"/> for supported values.\n",
                    position: (25, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: true,
               position: (14, 27),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (10, 26),
         },
        ),
       ],
       recursive: false,
       position: (9, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (32, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (32, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (32, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (32, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (33, 5),
             },
             Raw {
              content: "services",
              position: (33, 13),
             },
             Raw {
              content: "navidrome",
              position: (33, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (34, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Navidrome Media Server",
                 position: (34, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (35, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (35, 18),
                  },
                 ],
                },
               ],
               position: (35, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (36, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (36, 21),
                  },
                 ],
                },
               ],
               position: (36, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (37, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (38, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "",
                    position: (39, 1),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (39, 13),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "navidrome",
                        position: (39, 18),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/navidrome --configfile ",
                    position: (39, 28),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: PropertyAccess {
                      expression: Variable {
                       identifier: "settingsFormat",
                       position: (39, 58),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "generate",
                         position: (39, 73),
                        },
                       ],
                      },
                      default: None,
                     },
                     arguments: [
                      String {
                       parts: [
                        Raw {
                         content: "navidrome.json",
                         position: (39, 83),
                        },
                       ],
                      },
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (39, 99),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "settings",
                          position: (39, 103),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   },
                   Raw {
                    content: "\n",
                    position: (39, 112),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DynamicUser",
                    position: (41, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (41, 23),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "StateDirectory",
                    position: (42, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "navidrome",
                    position: (42, 27),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "WorkingDirectory",
                    position: (43, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/navidrome",
                    position: (43, 29),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RuntimeDirectory",
                    position: (44, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "navidrome",
                    position: (44, 29),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RootDirectory",
                    position: (45, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/run/navidrome",
                    position: (45, 26),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ReadWritePaths",
                    position: (46, 9),
                   },
                  ],
                 },
                 String {
                  parts: [],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "BindReadOnlyPaths",
                    position: (47, 9),
                   },
                  ],
                 },
                 BinaryOperation {
                  operator: Concatenation,
                  operands: [
                   List {
                    elements: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "builtins",
                       position: (48, 11),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "storeDir",
                         position: (48, 20),
                        },
                       ],
                      },
                      default: None,
                     },
                    ],
                    position: (47, 29),
                   },
                   FunctionApplication {
                    function: PropertyAccess {
                     expression: Variable {
                      identifier: "lib",
                      position: (49, 14),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "optional",
                        position: (49, 18),
                       },
                      ],
                     },
                     default: None,
                    },
                    arguments: [
                     HasProperty {
                      expression: PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (49, 28),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "settings",
                          position: (49, 32),
                         },
                        ],
                       },
                       default: None,
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "MusicFolder",
                         position: (49, 43),
                        },
                       ],
                      },
                      position: (49, 41),
                     },
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (49, 56),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "settings",
                         position: (49, 60),
                        },
                        Raw {
                         content: "MusicFolder",
                         position: (49, 69),
                        },
                       ],
                      },
                      default: None,
                     },
                    ],
                   },
                  ],
                  position: (49, 11),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "CapabilityBoundingSet",
                    position: (50, 9),
                   },
                  ],
                 },
                 String {
                  parts: [],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictAddressFamilies",
                    position: (51, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "AF_UNIX",
                      position: (51, 38),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "AF_INET",
                      position: (51, 48),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "AF_INET6",
                      position: (51, 58),
                     },
                    ],
                   },
                  ],
                  position: (51, 35),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictNamespaces",
                    position: (52, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (52, 30),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PrivateDevices",
                    position: (53, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (53, 26),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PrivateUsers",
                    position: (54, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (54, 24),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectClock",
                    position: (55, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (55, 24),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectControlGroups",
                    position: (56, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (56, 32),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectHome",
                    position: (57, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (57, 23),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectKernelLogs",
                    position: (58, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (58, 29),
                 },
                ),
                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: "SystemCallArchitectures",
                    position: (61, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "native",
                    position: (61, 36),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "SystemCallFilter",
                    position: (62, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "@system-service",
                      position: (62, 31),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "~@privileged",
                      position: (62, 49),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "~@resources",
                      position: (62, 64),
                     },
                    ],
                   },
                  ],
                  position: (62, 28),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictRealtime",
                    position: (63, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (63, 28),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "LockPersonality",
                    position: (64, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (64, 27),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "MemoryDenyWriteExecute",
                    position: (65, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (65, 34),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "UMask",
                    position: (66, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "0066",
                    position: (66, 18),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectHostname",
                    position: (67, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (67, 27),
                 },
                ),
               ],
               recursive: false,
               position: (37, 23),
              },
             ),
            ],
            recursive: false,
            position: (33, 34),
           },
          ),
         ],
         recursive: false,
         position: (32, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (8, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}