---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: LetIn {
  bindings: [
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "cfg",
       position: (4, 3),
      },
     ],
    },
    to: PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (4, 9),
     },
     attribute_path: AttributePath {
      parts: [
       Raw {
        content: "services",
        position: (4, 16),
       },
       Raw {
        content: "joycond",
        position: (4, 25),
       },
      ],
     },
     default: None,
    },
   },
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "kernelPackages",
       position: (5, 3),
      },
     ],
    },
    to: PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (5, 20),
     },
     attribute_path: AttributePath {
      parts: [
       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: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (11, 3),
        },
        Raw {
         content: "services",
         position: (11, 11),
        },
        Raw {
         content: "joycond",
         position: (11, 20),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (12, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (12, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "support for Nintendo Pro Controllers and Joycons",
              position: (12, 30),
             },
            ],
            position: (12, 29),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "package",
            position: (14, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (14, 15),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (15, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (15, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "package",
                  position: (15, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (16, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (16, 17),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "joycond",
                  position: (16, 22),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "defaultText",
                 position: (17, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "pkgs.joycond",
                 position: (17, 22),
                },
               ],
               position: (17, 21),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (18, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "The joycond package to use.\n",
                 position: (19, 1),
                },
               ],
               position: (18, 21),
              },
             },
            ],
            recursive: false,
            position: (14, 24),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (11, 30),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (24, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (24, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (24, 17),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (24, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "environment",
              position: (25, 5),
             },
             Raw {
              content: "systemPackages",
              position: (25, 17),
             },
            ],
           },
           to: List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (25, 36),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "package",
                 position: (25, 40),
                },
               ],
              },
              default: None,
             },
            ],
            position: (25, 34),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "boot",
              position: (27, 5),
             },
             Raw {
              content: "extraModulePackages",
              position: (27, 10),
             },
            ],
           },
           to: FunctionApplication {
            function: Variable {
             identifier: "optional",
             position: (27, 32),
            },
            arguments: [
             Parentheses {
              expression: FunctionApplication {
               function: Variable {
                identifier: "versionOlder",
                position: (27, 42),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "kernelPackages",
                  position: (27, 55),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "kernel",
                    position: (27, 70),
                   },
                   Raw {
                    content: "version",
                    position: (27, 77),
                   },
                  ],
                 },
                 default: None,
                },
                String {
                 parts: [
                  Raw {
                   content: "5.16",
                   position: (27, 86),
                  },
                 ],
                 position: (27, 85),
                },
               ],
              },
              position: (27, 41),
             },
             PropertyAccess {
              expression: Variable {
               identifier: "kernelPackages",
               position: (27, 93),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "hid-nintendo",
                 position: (27, 108),
                },
               ],
              },
              default: None,
             },
            ],
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "services",
              position: (29, 5),
             },
             Raw {
              content: "udev",
              position: (29, 14),
             },
             Raw {
              content: "packages",
              position: (29, 19),
             },
            ],
           },
           to: List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (29, 32),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "package",
                 position: (29, 36),
                },
               ],
              },
              default: None,
             },
            ],
            position: (29, 30),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "systemd",
              position: (31, 5),
             },
             Raw {
              content: "packages",
              position: (31, 13),
             },
            ],
           },
           to: List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (31, 26),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "package",
                 position: (31, 30),
                },
               ],
              },
              default: None,
             },
            ],
            position: (31, 24),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "systemd",
              position: (34, 5),
             },
             Raw {
              content: "services",
              position: (34, 13),
             },
             Raw {
              content: "joycond",
              position: (34, 22),
             },
             Raw {
              content: "wantedBy",
              position: (34, 30),
             },
            ],
           },
           to: List {
            elements: [
             String {
              parts: [
               Raw {
                content: "multi-user.target",
                position: (34, 44),
               },
              ],
              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),
}