---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "options",
    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: "name",
        position: (7, 3),
       },
      ],
     },
     String {
      parts: [
       Raw {
        content: "headphones",
        position: (7, 11),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (9, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (9, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (9, 16),
        },
        Raw {
         content: "headphones",
         position: (9, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "opt",
        position: (10, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "options",
       position: (10, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (10, 17),
        },
        Raw {
         content: "headphones",
         position: (10, 26),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   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: "headphones",
            position: (19, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (20, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (20, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (21, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (21, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (21, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (22, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (22, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Whether to enable the headphones server.",
                    position: (23, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (20, 25),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "dataDir",
               position: (25, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (25, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (26, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (26, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "path",
                     position: (26, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (27, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/",
                    position: (27, 20),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "name",
                     position: (27, 31),
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (28, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Path where to store data files.",
                    position: (28, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (25, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "configFile",
               position: (30, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (30, 20),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (31, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (31, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "path",
                     position: (31, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (32, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (32, 22),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "dataDir",
                        position: (32, 26),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/config.ini",
                    position: (32, 34),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (33, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (33, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "\"",
                      position: (33, 43),
                     },
                     Raw {
                      content: "$",
                      position: (33, 44),
                     },
                     Raw {
                      content: "{config.",
                      position: (33, 47),
                     },
                     Expression {
                      expression: PropertyAccess {
                       expression: Variable {
                        identifier: "opt",
                        position: (33, 57),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "dataDir",
                          position: (33, 61),
                         },
                        ],
                       },
                       default: None,
                      },
                     },
                     Raw {
                      content: "}/config.ini\"",
                      position: (33, 69),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (34, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Path to config file.",
                    position: (34, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (30, 29),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "host",
               position: (36, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (36, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (37, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (37, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (37, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (38, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "localhost",
                    position: (38, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (39, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Host to listen on.",
                    position: (39, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (36, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (41, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (41, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (42, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (42, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "ints",
                     position: (42, 22),
                    },
                    Raw {
                     content: "u16",
                     position: (42, 27),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (43, 9),
                   },
                  ],
                 },
                 Int {
                  value: 8181,
                  position: (43, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (44, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Port to bind to.",
                    position: (44, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (41, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "user",
               position: (46, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (46, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (47, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (47, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (47, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (48, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "name",
                  position: (48, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (49, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "User to run the service as",
                    position: (49, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (46, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "group",
               position: (51, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (51, 15),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (52, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (52, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (52, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (53, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "name",
                  position: (53, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (54, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Group to run the service as",
                    position: (54, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (51, 24),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (19, 27),
         },
        ),
       ],
       recursive: false,
       position: (18, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (62, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (62, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (62, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (62, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (64, 5),
             },
             Raw {
              content: "users",
              position: (64, 11),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "optionalAttrs",
             position: (64, 19),
            },
            arguments: [
             BinaryOperation {
              operator: EqualTo,
              operands: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (64, 34),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "user",
                   position: (64, 38),
                  },
                 ],
                },
                default: None,
               },
               Variable {
                identifier: "name",
                position: (64, 46),
               },
              ],
              position: (64, 43),
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Expression {
                   expression: Variable {
                    identifier: "name",
                    position: (65, 9),
                   },
                  },
                 ],
                },
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "uid",
                      position: (66, 9),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "config",
                     position: (66, 15),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "ids",
                       position: (66, 22),
                      },
                      Raw {
                       content: "uids",
                       position: (66, 26),
                      },
                      Raw {
                       content: "headphones",
                       position: (66, 31),
                      },
                     ],
                    },
                    default: None,
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "group",
                      position: (67, 9),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (67, 17),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "group",
                       position: (67, 21),
                      },
                     ],
                    },
                    default: None,
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "description",
                      position: (68, 9),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "headphones user",
                      position: (68, 24),
                     },
                    ],
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "home",
                      position: (69, 9),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (69, 16),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "dataDir",
                       position: (69, 20),
                      },
                     ],
                    },
                    default: None,
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "createHome",
                      position: (70, 9),
                     },
                    ],
                   },
                   Variable {
                    identifier: "true",
                    position: (70, 22),
                   },
                  ),
                 ],
                 recursive: false,
                 position: (65, 17),
                },
               ),
              ],
              recursive: false,
              position: (64, 52),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (74, 5),
             },
             Raw {
              content: "groups",
              position: (74, 11),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "optionalAttrs",
             position: (74, 20),
            },
            arguments: [
             BinaryOperation {
              operator: EqualTo,
              operands: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (74, 35),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "group",
                   position: (74, 39),
                  },
                 ],
                },
                default: None,
               },
               Variable {
                identifier: "name",
                position: (74, 48),
               },
              ],
              position: (74, 45),
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Expression {
                   expression: Variable {
                    identifier: "name",
                    position: (75, 9),
                   },
                  },
                  Raw {
                   content: "gid",
                   position: (75, 15),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "config",
                  position: (75, 21),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "ids",
                    position: (75, 28),
                   },
                   Raw {
                    content: "gids",
                    position: (75, 32),
                   },
                   Raw {
                    content: "headphones",
                    position: (75, 37),
                   },
                  ],
                 },
                 default: None,
                },
               ),
              ],
              recursive: false,
              position: (74, 54),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (78, 5),
             },
             Raw {
              content: "services",
              position: (78, 13),
             },
             Raw {
              content: "headphones",
              position: (78, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (79, 9),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Headphones Server",
                 position: (79, 24),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (80, 9),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (80, 26),
                  },
                 ],
                },
               ],
               position: (80, 23),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (81, 9),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (81, 20),
                  },
                 ],
                },
               ],
               position: (81, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (82, 9),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (83, 11),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (83, 18),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (83, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (84, 11),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (84, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (84, 23),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (85, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (85, 26),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "headphones",
                        position: (85, 31),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/headphones --datadir ",
                    position: (85, 42),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (85, 70),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "dataDir",
                        position: (85, 74),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: " --config ",
                    position: (85, 82),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (85, 94),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "configFile",
                        position: (85, 98),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: " --host ",
                    position: (85, 109),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (85, 119),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "host",
                        position: (85, 123),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: " --port ",
                    position: (85, 128),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: Variable {
                      identifier: "toString",
                      position: (85, 138),
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (85, 147),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "port",
                          position: (85, 151),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (82, 25),
              },
             ),
            ],
            recursive: false,
            position: (78, 35),
           },
          ),
         ],
         recursive: false,
         position: (62, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (14, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}