---
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: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "programs",
         position: (6, 16),
        },
        Raw {
         content: "gamemode",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "settingsFormat",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 20),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "formats",
          position: (7, 25),
         },
         Raw {
          content: "ini",
          position: (7, 33),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [],
        recursive: false,
        position: (7, 37),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "configFile",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "settingsFormat",
        position: (8, 16),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "generate",
          position: (8, 31),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "gamemode.ini",
          position: (8, 41),
         },
        ],
       },
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (8, 55),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "settings",
           position: (8, 59),
          },
         ],
        },
        default: None,
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (11, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "programs",
            position: (12, 5),
           },
           Raw {
            content: "gamemode",
            position: (12, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (13, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (13, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "GameMode to optimise system performance on demand",
                 position: (13, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enableRenice",
               position: (15, 7),
              },
             ],
            },
            BinaryOperation {
             operator: Update,
             operands: [
              FunctionApplication {
               function: Variable {
                identifier: "mkEnableOption",
                position: (15, 22),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "CAP_SYS_NICE on gamemoded to support lowering process niceness",
                   position: (15, 38),
                  },
                 ],
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (16, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (16, 19),
                 },
                ),
               ],
               recursive: false,
               position: (15, 105),
              },
             ],
             position: (15, 102),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "settings",
               position: (19, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (19, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (20, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "settingsFormat",
                   position: (20, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (20, 31),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (21, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [],
                  recursive: false,
                  position: (21, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (22, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "System-wide configuration for GameMode (/etc/gamemode.ini).\nSee gamemoded(8) man page for available settings.\n",
                    position: (23, 1),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (26, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (26, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "{\n  general = {\n    renice = 10;\n  };\n\n  # Warning: GPU optimisations have the potential to damage hardware\n  gpu = {\n    apply_gpu_optimisations = \"accept-responsibility\";\n    gpu_device = 0;\n    amd_performance_level = \"high\";\n  };\n\n  custom = {\n    start = \"",
                      position: (27, 1),
                     },
                     Raw {
                      content: "$",
                      position: (40, 24),
                     },
                     Raw {
                      content: "{pkgs.libnotify}/bin/notify-send 'GameMode started'\";\n    end = \"",
                      position: (40, 27),
                     },
                     Raw {
                      content: "$",
                      position: (41, 22),
                     },
                     Raw {
                      content: "{pkgs.libnotify}/bin/notify-send 'GameMode ended'\";\n  };\n}\n",
                      position: (41, 25),
                     },
                    ],
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (19, 27),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (12, 25),
         },
        ),
       ],
       recursive: false,
       position: (11, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (49, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (49, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (49, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (49, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (50, 5),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "systemPackages",
                 position: (51, 7),
                },
               ],
              },
              List {
               elements: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (51, 26),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "gamemode",
                    position: (51, 31),
                   },
                  ],
                 },
                 default: None,
                },
               ],
               position: (51, 24),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "etc",
                 position: (52, 7),
                },
                Expression {
                 expression: String {
                  parts: [
                   Raw {
                    content: "gamemode.ini",
                    position: (52, 12),
                   },
                  ],
                 },
                },
                Raw {
                 content: "source",
                 position: (52, 26),
                },
               ],
              },
              Variable {
               identifier: "configFile",
               position: (52, 35),
              },
             ),
            ],
            recursive: false,
            position: (50, 19),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "security",
              position: (55, 5),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "polkit",
                 position: (56, 7),
                },
                Raw {
                 content: "enable",
                 position: (56, 14),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (56, 23),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wrappers",
                 position: (57, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "mkIf",
                position: (57, 18),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (57, 23),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "enableRenice",
                    position: (57, 27),
                   },
                  ],
                 },
                 default: None,
                },
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "gamemoded",
                      position: (58, 9),
                     },
                    ],
                   },
                   Map {
                    bindings: [
                     KeyValue(
                      AttributePath {
                       attributes: [
                        Raw {
                         content: "owner",
                         position: (59, 11),
                        },
                       ],
                      },
                      String {
                       parts: [
                        Raw {
                         content: "root",
                         position: (59, 20),
                        },
                       ],
                      },
                     ),
                     KeyValue(
                      AttributePath {
                       attributes: [
                        Raw {
                         content: "group",
                         position: (60, 11),
                        },
                       ],
                      },
                      String {
                       parts: [
                        Raw {
                         content: "root",
                         position: (60, 20),
                        },
                       ],
                      },
                     ),
                     KeyValue(
                      AttributePath {
                       attributes: [
                        Raw {
                         content: "source",
                         position: (61, 11),
                        },
                       ],
                      },
                      String {
                       parts: [
                        Expression {
                         expression: PropertyAccess {
                          expression: Variable {
                           identifier: "pkgs",
                           position: (61, 23),
                          },
                          attribute_path: AttributePath {
                           attributes: [
                            Raw {
                             content: "gamemode",
                             position: (61, 28),
                            },
                           ],
                          },
                          default: None,
                         },
                        },
                        Raw {
                         content: "/bin/gamemoded",
                         position: (61, 37),
                        },
                       ],
                      },
                     ),
                     KeyValue(
                      AttributePath {
                       attributes: [
                        Raw {
                         content: "capabilities",
                         position: (62, 11),
                        },
                       ],
                      },
                      String {
                       parts: [
                        Raw {
                         content: "cap_sys_nice+ep",
                         position: (62, 27),
                        },
                       ],
                      },
                     ),
                    ],
                    recursive: false,
                    position: (58, 21),
                   },
                  ),
                 ],
                 recursive: false,
                 position: (57, 40),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (55, 16),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (67, 5),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "packages",
                 position: (68, 7),
                },
               ],
              },
              List {
               elements: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (68, 20),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "gamemode",
                    position: (68, 25),
                   },
                  ],
                 },
                 default: None,
                },
               ],
               position: (68, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "user",
                 position: (69, 7),
                },
                Raw {
                 content: "services",
                 position: (69, 12),
                },
                Raw {
                 content: "gamemoded",
                 position: (69, 21),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "wantedBy",
                    position: (72, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "default.target",
                      position: (72, 23),
                     },
                    ],
                   },
                  ],
                  position: (72, 20),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "environment",
                    position: (80, 9),
                   },
                   Raw {
                    content: "PATH",
                    position: (80, 21),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "mkForce",
                   position: (80, 28),
                  },
                  arguments: [
                   FunctionApplication {
                    function: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (80, 37),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "linkFarm",
                        position: (80, 42),
                       },
                      ],
                     },
                     default: None,
                    },
                    arguments: [
                     String {
                      parts: [
                       Raw {
                        content: "pkexec",
                        position: (80, 52),
                       },
                      ],
                     },
                     List {
                      elements: [
                       Map {
                        bindings: [
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "name",
                             position: (82, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "pkexec",
                             position: (82, 21),
                            },
                           ],
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "path",
                             position: (83, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Expression {
                             expression: PropertyAccess {
                              expression: Variable {
                               identifier: "config",
                               position: (83, 23),
                              },
                              attribute_path: AttributePath {
                               attributes: [
                                Raw {
                                 content: "security",
                                 position: (83, 30),
                                },
                                Raw {
                                 content: "wrapperDir",
                                 position: (83, 39),
                                },
                               ],
                              },
                              default: None,
                             },
                            },
                            Raw {
                             content: "/pkexec",
                             position: (83, 50),
                            },
                           ],
                          },
                         ),
                        ],
                        recursive: false,
                        position: (81, 11),
                       },
                      ],
                      position: (80, 60),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "serviceConfig",
                    position: (87, 9),
                   },
                   Raw {
                    content: "ExecStart",
                    position: (87, 23),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "mkIf",
                   position: (87, 35),
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (87, 40),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "enableRenice",
                       position: (87, 44),
                      },
                     ],
                    },
                    default: None,
                   },
                   List {
                    elements: [
                     String {
                      parts: [],
                     },
                     String {
                      parts: [
                       Expression {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "config",
                          position: (89, 14),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "security",
                            position: (89, 21),
                           },
                           Raw {
                            content: "wrapperDir",
                            position: (89, 30),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                       Raw {
                        content: "/gamemoded",
                        position: (89, 41),
                       },
                      ],
                     },
                    ],
                    position: (87, 57),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (69, 33),
              },
             ),
            ],
            recursive: false,
            position: (67, 15),
           },
          ),
         ],
         recursive: false,
         position: (49, 28),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (95, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "maintainers",
            position: (96, 5),
           },
          ],
         },
         With {
          expression: Variable {
           identifier: "maintainers",
           position: (96, 24),
          },
          target: List {
           elements: [
            Variable {
             identifier: "kira-bruneau",
             position: (96, 39),
            },
           ],
           position: (96, 37),
          },
          position: (96, 19),
         },
        ),
       ],
       recursive: false,
       position: (95, 10),
      },
     ),
    ],
    recursive: false,
    position: (10, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}