---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    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: "programs",
         position: (6, 16),
        },
        Raw {
         content: "corectrl",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (9, 3),
        },
        Raw {
         content: "programs",
         position: (9, 11),
        },
        Raw {
         content: "corectrl",
         position: (9, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (10, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (10, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "A tool to overclock amd graphics cards and processors.\nAdd your user to the corectrl group to run corectrl without needing to enter your password\n",
              position: (11, 1),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "gpuOverclock",
            position: (15, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (16, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (16, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "true\n",
                 position: (17, 1),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ppfeaturemask",
               position: (19, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (19, 23),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (20, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (20, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (20, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "0xfffd7fff",
                    position: (21, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (22, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "0xffffffff",
                    position: (22, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Sets the `amdgpu.ppfeaturemask` kernel option.\nIn particular, it is used here to set the overdrive bit.\nDefault is `0xfffd7fff` as it is less likely to cause flicker issues.\nSetting it to `0xffffffff` enables all features.\n",
                    position: (24, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (19, 32),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (15, 20),
         },
        ),
       ],
       recursive: false,
       position: (9, 31),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (33, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (33, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (33, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (33, 21),
           },
          ],
         },
         default: None,
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "lib",
           position: (33, 29),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "mkMerge",
             position: (33, 33),
            },
           ],
          },
          default: None,
         },
         arguments: [
          List {
           elements: [
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "environment",
                  position: (35, 7),
                 },
                 Raw {
                  content: "systemPackages",
                  position: (35, 19),
                 },
                ],
               },
               List {
                elements: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (35, 38),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "corectrl",
                     position: (35, 43),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
                position: (35, 36),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "services",
                  position: (37, 7),
                 },
                 Raw {
                  content: "dbus",
                  position: (37, 16),
                 },
                 Raw {
                  content: "packages",
                  position: (37, 21),
                 },
                ],
               },
               List {
                elements: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (37, 34),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "corectrl",
                     position: (37, 39),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
                position: (37, 32),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "users",
                  position: (39, 7),
                 },
                 Raw {
                  content: "groups",
                  position: (39, 13),
                 },
                 Raw {
                  content: "corectrl",
                  position: (39, 20),
                 },
                ],
               },
               Map {
                bindings: [],
                recursive: false,
                position: (39, 31),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "security",
                  position: (41, 7),
                 },
                 Raw {
                  content: "polkit",
                  position: (41, 16),
                 },
                 Raw {
                  content: "extraConfig",
                  position: (41, 23),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "polkit.addRule(function(action, subject) {\n    if ((action.id == \"org.corectrl.helper.init\" ||\n         action.id == \"org.corectrl.helperkiller.init\") &&\n        subject.local == true &&\n        subject.active == true &&\n        subject.isInGroup(\"corectrl\")) {\n            return polkit.Result.YES;\n    }\n});\n",
                  position: (42, 1),
                 },
                ],
               },
              ),
             ],
             recursive: false,
             position: (34, 5),
            },
            FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "lib",
               position: (54, 6),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "mkIf",
                 position: (54, 10),
                },
               ],
              },
              default: None,
             },
             arguments: [
              PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (54, 15),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "gpuOverclock",
                  position: (54, 19),
                 },
                 Raw {
                  content: "enable",
                  position: (54, 32),
                 },
                ],
               },
               default: None,
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "boot",
                    position: (57, 7),
                   },
                   Raw {
                    content: "kernelParams",
                    position: (57, 12),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "amdgpu.ppfeaturemask=",
                      position: (57, 30),
                     },
                     Expression {
                      expression: PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (57, 53),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "gpuOverclock",
                          position: (57, 57),
                         },
                         Raw {
                          content: "ppfeaturemask",
                          position: (57, 70),
                         },
                        ],
                       },
                       default: None,
                      },
                     },
                    ],
                   },
                  ],
                  position: (57, 27),
                 },
                ),
               ],
               recursive: false,
               position: (54, 39),
              },
             ],
            },
           ],
           position: (33, 41),
          },
         ],
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (61, 3),
        },
        Raw {
         content: "maintainers",
         position: (61, 8),
        },
       ],
      },
      With {
       expression: PropertyAccess {
        expression: Variable {
         identifier: "lib",
         position: (61, 27),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "maintainers",
           position: (61, 31),
          },
         ],
        },
        default: None,
       },
       target: List {
        elements: [
         Variable {
          identifier: "artturin",
          position: (61, 46),
         },
        ],
        position: (61, 44),
       },
       position: (61, 22),
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}