---
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: (7, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (7, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "hardware",
         position: (7, 16),
        },
        Raw {
         content: "facetimehd",
         position: (7, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "kernelPackages",
        position: (9, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (9, 20),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "boot",
         position: (9, 27),
        },
        Raw {
         content: "kernelPackages",
         position: (9, 32),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (15, 3),
        },
        Raw {
         content: "hardware",
         position: (15, 11),
        },
        Raw {
         content: "facetimehd",
         position: (15, 20),
        },
        Raw {
         content: "enable",
         position: (15, 31),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkEnableOption",
        position: (15, 40),
       },
       arguments: [
        String {
         parts: [
          Raw {
           content: "facetimehd kernel module",
          },
         ],
         position: (15, 55),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (17, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (17, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (17, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (17, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (19, 5),
             },
             Raw {
              content: "kernelModules",
              position: (19, 10),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "facetimehd",
               },
              ],
              position: (19, 28),
             },
            ],
            position: (19, 26),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (21, 5),
             },
             Raw {
              content: "blacklistedKernelModules",
              position: (21, 10),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "bdc_pci",
               },
              ],
              position: (21, 39),
             },
            ],
            position: (21, 37),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (23, 5),
             },
             Raw {
              content: "extraModulePackages",
              position: (23, 10),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "kernelPackages",
               position: (23, 34),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "facetimehd",
                 position: (23, 49),
                },
               ],
              },
              default: None,
             },
            ],
            position: (23, 32),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "hardware",
              position: (25, 5),
             },
             Raw {
              content: "firmware",
              position: (25, 14),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (25, 27),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "facetimehd-firmware",
                 position: (25, 32),
                },
               ],
              },
              default: None,
             },
            ],
            position: (25, 25),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "powerManagement",
              position: (28, 5),
             },
             Raw {
              content: "powerDownCommands",
              position: (28, 21),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "",
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (29, 9),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "kmod",
                  position: (29, 14),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "/bin/lsmod | ",
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (29, 34),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "gnugrep",
                  position: (29, 39),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "/bin/grep -q \"^facetimehd\" && ",
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (29, 79),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "kmod",
                  position: (29, 84),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "/bin/rmmod -f -v facetimehd\n",
             },
            ],
            position: (28, 41),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "powerManagement",
              position: (33, 5),
             },
             Raw {
              content: "resumeCommands",
              position: (33, 21),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "",
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (34, 9),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "kmod",
                  position: (34, 14),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "/bin/modprobe -v facetimehd\n",
             },
            ],
            position: (33, 38),
           },
          ),
         ],
         recursive: false,
         position: (17, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (13, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}