---
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: "sundtek",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (10, 3),
        },
        Raw {
         content: "services",
         position: (10, 11),
        },
        Raw {
         content: "sundtek",
         position: (10, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (11, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (11, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "Sundtek driver",
              position: (11, 30),
             },
            ],
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (10, 30),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (14, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (14, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (14, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (14, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (16, 5),
             },
             Raw {
              content: "systemPackages",
              position: (16, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (16, 36),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "sundtek",
                 position: (16, 41),
                },
               ],
              },
              default: None,
             },
            ],
            position: (16, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (18, 5),
             },
             Raw {
              content: "services",
              position: (18, 13),
             },
             Raw {
              content: "sundtek",
              position: (18, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (19, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Sundtek driver",
                 position: (19, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (20, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (20, 21),
                  },
                 ],
                },
               ],
               position: (20, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (22, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "oneshot",
                    position: (23, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (24, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "",
                    position: (25, 1),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (25, 13),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "sundtek",
                        position: (25, 18),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/mediasrv -d -v -p ",
                    position: (25, 26),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (25, 51),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "sundtek",
                        position: (25, 56),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin ;\\\n",
                    position: (25, 64),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (26, 13),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "sundtek",
                        position: (26, 18),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/mediaclient --start --wait-for-devices\n",
                    position: (26, 26),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStop",
                    position: (28, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (28, 23),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "sundtek",
                        position: (28, 28),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/mediaclient --shutdown",
                    position: (28, 36),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RemainAfterExit",
                    position: (29, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (29, 27),
                 },
                ),
               ],
               recursive: false,
               position: (22, 23),
              },
             ),
            ],
            recursive: false,
            position: (18, 32),
           },
          ),
         ],
         recursive: false,
         position: (14, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (9, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}