---
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: "spotifyd",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "toml",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 10),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "formats",
          position: (7, 15),
         },
         Raw {
          content: "toml",
          position: (7, 23),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [],
        recursive: false,
        position: (7, 28),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "warnConfig",
        position: (8, 3),
       },
      ],
     },
     IfThenElse {
      predicate: BinaryOperation {
       operator: NotEqualTo,
       operands: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (9, 8),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "config",
            position: (9, 12),
           },
          ],
         },
         default: None,
        },
        String {
         parts: [],
        },
       ],
       position: (9, 19),
      },
      then: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "lib",
         position: (10, 10),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "trace",
           position: (10, 14),
          },
         ],
        },
        default: None,
       },
       arguments: [
        String {
         parts: [
          Raw {
           content: "Using the stringly typed .config attribute is discouraged. Use the TOML typed .settings attribute instead.",
           position: (10, 21),
          },
         ],
        },
       ],
      },
      else_: Variable {
       identifier: "id",
       position: (11, 10),
      },
      position: (9, 5),
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "spotifydConf",
        position: (12, 3),
       },
      ],
     },
     IfThenElse {
      predicate: BinaryOperation {
       operator: NotEqualTo,
       operands: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (13, 8),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "settings",
            position: (13, 12),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [],
         recursive: false,
         position: (13, 24),
        },
       ],
       position: (13, 21),
      },
      then: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "toml",
         position: (14, 10),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "generate",
           position: (14, 15),
          },
         ],
        },
        default: None,
       },
       arguments: [
        String {
         parts: [
          Raw {
           content: "spotify.conf",
           position: (14, 25),
          },
         ],
        },
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (14, 39),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "settings",
            position: (14, 43),
           },
          ],
         },
         default: None,
        },
       ],
      },
      else_: FunctionApplication {
       function: Variable {
        identifier: "warnConfig",
        position: (15, 10),
       },
       arguments: [
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "pkgs",
           position: (15, 22),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "writeText",
             position: (15, 27),
            },
           ],
          },
          default: None,
         },
         arguments: [
          String {
           parts: [
            Raw {
             content: "spotifyd.conf",
             position: (15, 38),
            },
           ],
          },
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (15, 53),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "config",
              position: (15, 57),
             },
            ],
           },
           default: None,
          },
         ],
        },
       ],
      },
      position: (13, 5),
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (18, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (19, 5),
           },
           Raw {
            content: "spotifyd",
            position: (19, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (20, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (20, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "spotifyd, a Spotify playing daemon",
                 position: (20, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "config",
               position: (22, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (22, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (24, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (24, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "lines",
                     position: (24, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (25, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "(Deprecated) Configuration for Spotifyd. For syntax and directives, see\n<link xlink:href=\"https://github.com/Spotifyd/spotifyd#Configuration\"/>.\n",
                    position: (26, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (22, 25),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "settings",
               position: (31, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (31, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (32, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [],
                  recursive: false,
                  position: (32, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (33, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "toml",
                   position: (33, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (33, 21),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (34, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "global",
                       position: (34, 21),
                      },
                      Raw {
                       content: "bitrate",
                       position: (34, 28),
                      },
                     ],
                    },
                    Int {
                     value: 320,
                     position: (34, 38),
                    },
                   ),
                  ],
                  recursive: false,
                  position: (34, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (35, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Configuration for Spotifyd. For syntax and directives, see\n<link xlink:href=\"https://github.com/Spotifyd/spotifyd#Configuration\"/>.\n",
                    position: (36, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (31, 27),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (19, 25),
         },
        ),
       ],
       recursive: false,
       position: (18, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (43, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (43, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (43, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (43, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "assertions",
              position: (44, 5),
             },
            ],
           },
           List {
            elements: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "assertion",
                   position: (46, 9),
                  },
                 ],
                },
                BinaryOperation {
                 operator: LogicalOr,
                 operands: [
                  BinaryOperation {
                   operator: EqualTo,
                   operands: [
                    PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (46, 21),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "config",
                        position: (46, 25),
                       },
                      ],
                     },
                     default: None,
                    },
                    String {
                     parts: [],
                    },
                   ],
                   position: (46, 32),
                  },
                  BinaryOperation {
                   operator: EqualTo,
                   operands: [
                    PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (46, 41),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "settings",
                        position: (46, 45),
                       },
                      ],
                     },
                     default: None,
                    },
                    Map {
                     bindings: [],
                     recursive: false,
                     position: (46, 57),
                    },
                   ],
                   position: (46, 54),
                  },
                 ],
                 position: (46, 38),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "message",
                   position: (47, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "At most one of the .config attribute and the .settings attribute may be set",
                   position: (47, 20),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (45, 7),
             },
            ],
            position: (44, 18),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (51, 5),
             },
             Raw {
              content: "services",
              position: (51, 13),
             },
             Raw {
              content: "spotifyd",
              position: (51, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (52, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (52, 21),
                  },
                 ],
                },
               ],
               position: (52, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (53, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network-online.target",
                   position: (53, 18),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "sound.target",
                   position: (53, 42),
                  },
                 ],
                },
               ],
               position: (53, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (54, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "spotifyd, a Spotify playing daemon",
                 position: (54, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "environment",
                 position: (55, 7),
                },
                Raw {
                 content: "SHELL",
                 position: (55, 19),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/bin/sh",
                 position: (55, 28),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (56, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (57, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (57, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "spotifyd",
                        position: (57, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/spotifyd --no-daemon --cache-path /var/cache/spotifyd --config-path ",
                    position: (57, 38),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "spotifydConf",
                     position: (57, 113),
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (58, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "always",
                    position: (58, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestartSec",
                    position: (59, 9),
                   },
                  ],
                 },
                 Int {
                  value: 12,
                  position: (59, 22),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DynamicUser",
                    position: (60, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (60, 23),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "CacheDirectory",
                    position: (61, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "spotifyd",
                    position: (61, 27),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "SupplementaryGroups",
                    position: (62, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "audio",
                      position: (62, 33),
                     },
                    ],
                   },
                  ],
                  position: (62, 31),
                 },
                ),
               ],
               recursive: false,
               position: (56, 23),
              },
             ),
            ],
            recursive: false,
            position: (51, 33),
           },
          ),
         ],
         recursive: false,
         position: (43, 28),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (67, 3),
        },
        Raw {
         content: "maintainers",
         position: (67, 8),
        },
       ],
      },
      List {
       elements: [
        PropertyAccess {
         expression: Variable {
          identifier: "maintainers",
          position: (67, 24),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "anderslundstedt",
            position: (67, 36),
           },
          ],
         },
         default: None,
        },
       ],
       position: (67, 22),
      },
     ),
    ],
    recursive: false,
    position: (17, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}