---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: LetIn {
  bindings: [
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "cfg",
       position: (4, 3),
      },
     ],
    },
    PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (4, 9),
     },
     attribute_path: AttributePath {
      attributes: [
       Raw {
        content: "services",
        position: (4, 16),
       },
       Raw {
        content: "joycond",
        position: (4, 25),
       },
      ],
     },
     default: None,
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "kernelPackages",
       position: (5, 3),
      },
     ],
    },
    PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (5, 20),
     },
     attribute_path: AttributePath {
      attributes: [
       Raw {
        content: "boot",
        position: (5, 27),
       },
       Raw {
        content: "kernelPackages",
        position: (5, 32),
       },
      ],
     },
     default: None,
    },
   ),
  ],
  target: With {
   expression: Variable {
    identifier: "lib",
    position: (8, 6),
   },
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (11, 3),
        },
        Raw {
         content: "services",
         position: (11, 11),
        },
        Raw {
         content: "joycond",
         position: (11, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (12, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (12, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "support for Nintendo Pro Controllers and Joycons",
              position: (12, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "package",
            position: (14, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (14, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (15, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (15, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "package",
                  position: (15, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (16, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (16, 17),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "joycond",
                  position: (16, 22),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (17, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "pkgs.joycond",
                 position: (17, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (18, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The joycond package to use.\n",
                 position: (19, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (14, 24),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (11, 30),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (24, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (24, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (24, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (24, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (25, 5),
             },
             Raw {
              content: "systemPackages",
              position: (25, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "kernelPackages",
               position: (26, 7),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "hid-nintendo",
                 position: (26, 22),
                },
               ],
              },
              default: None,
             },
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (27, 7),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (27, 11),
                },
               ],
              },
              default: None,
             },
            ],
            position: (25, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (30, 5),
             },
             Raw {
              content: "extraModulePackages",
              position: (30, 10),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "kernelPackages",
               position: (30, 34),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "hid-nintendo",
                 position: (30, 49),
                },
               ],
              },
              default: None,
             },
            ],
            position: (30, 32),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (31, 5),
             },
             Raw {
              content: "kernelModules",
              position: (31, 10),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "hid_nintendo",
                position: (31, 29),
               },
              ],
             },
            ],
            position: (31, 26),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (33, 5),
             },
             Raw {
              content: "udev",
              position: (33, 14),
             },
             Raw {
              content: "packages",
              position: (33, 19),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (33, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (33, 36),
                },
               ],
              },
              default: None,
             },
            ],
            position: (33, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (35, 5),
             },
             Raw {
              content: "packages",
              position: (35, 13),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (35, 26),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (35, 30),
                },
               ],
              },
              default: None,
             },
            ],
            position: (35, 24),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (38, 5),
             },
             Raw {
              content: "services",
              position: (38, 13),
             },
             Raw {
              content: "joycond",
              position: (38, 22),
             },
             Raw {
              content: "wantedBy",
              position: (38, 30),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "multi-user.target",
                position: (38, 44),
               },
              ],
             },
            ],
            position: (38, 41),
           },
          ),
         ],
         recursive: false,
         position: (24, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (10, 1),
   },
   position: (8, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}