---
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, 29),
           },
          ],
         },
        ),
        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, 21),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (18, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The joycond package to use.\n",
                },
               ],
               position: (18, 21),
              },
             ),
            ],
            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: "cfg",
               position: (25, 36),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (25, 40),
                },
               ],
              },
              default: None,
             },
            ],
            position: (25, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (27, 5),
             },
             Raw {
              content: "extraModulePackages",
              position: (27, 10),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "optional",
             position: (27, 32),
            },
            arguments: [
             FunctionApplication {
              function: Variable {
               identifier: "versionOlder",
               position: (27, 42),
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "kernelPackages",
                 position: (27, 55),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "kernel",
                   position: (27, 70),
                  },
                  Raw {
                   content: "version",
                   position: (27, 77),
                  },
                 ],
                },
                default: None,
               },
               String {
                parts: [
                 Raw {
                  content: "5.16",
                 },
                ],
                position: (27, 85),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "kernelPackages",
               position: (27, 93),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "hid-nintendo",
                 position: (27, 108),
                },
               ],
              },
              default: None,
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (29, 5),
             },
             Raw {
              content: "udev",
              position: (29, 14),
             },
             Raw {
              content: "packages",
              position: (29, 19),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (29, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (29, 36),
                },
               ],
              },
              default: None,
             },
            ],
            position: (29, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (31, 5),
             },
             Raw {
              content: "packages",
              position: (31, 13),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (31, 26),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (31, 30),
                },
               ],
              },
              default: None,
             },
            ],
            position: (31, 24),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (34, 5),
             },
             Raw {
              content: "services",
              position: (34, 13),
             },
             Raw {
              content: "joycond",
              position: (34, 22),
             },
             Raw {
              content: "wantedBy",
              position: (34, 30),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "multi-user.target",
               },
              ],
              position: (34, 43),
             },
            ],
            position: (34, 41),
           },
          ),
         ],
         recursive: false,
         position: (24, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (10, 1),
   },
   position: (8, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}