---
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: "crashdump",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 15),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "boot",
         position: (6, 22),
        },
        Raw {
         content: "crashDump",
         position: (6, 27),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "kernelParams",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "concatStringsSep",
       position: (8, 18),
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: " ",
          position: (8, 36),
         },
        ],
       },
       PropertyAccess {
        expression: Variable {
         identifier: "crashdump",
         position: (8, 39),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "kernelParams",
           position: (8, 49),
          },
         ],
        },
        default: None,
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (13, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "boot",
            position: (14, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "crashDump",
               position: (15, 7),
              },
             ],
            },
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "enable",
                  position: (16, 9),
                 },
                ],
               },
               FunctionApplication {
                function: Variable {
                 identifier: "mkOption",
                 position: (16, 18),
                },
                arguments: [
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "type",
                       position: (17, 11),
                      },
                     ],
                    },
                    PropertyAccess {
                     expression: Variable {
                      identifier: "types",
                      position: (17, 18),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "bool",
                        position: (17, 24),
                       },
                      ],
                     },
                     default: None,
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "default",
                       position: (18, 11),
                      },
                     ],
                    },
                    Variable {
                     identifier: "false",
                     position: (18, 21),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "description",
                       position: (19, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "If enabled, NixOS will set up a kernel that will\nboot on crash, and leave the user in systemd rescue\nto be able to save the crashed kernel dump at\n/proc/vmcore.\nIt also activates the NMI watchdog.\n",
                       position: (20, 1),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (16, 27),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "reservedMemory",
                  position: (27, 9),
                 },
                ],
               },
               FunctionApplication {
                function: Variable {
                 identifier: "mkOption",
                 position: (27, 26),
                },
                arguments: [
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "default",
                       position: (28, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "128M",
                       position: (28, 22),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "type",
                       position: (29, 11),
                      },
                     ],
                    },
                    PropertyAccess {
                     expression: Variable {
                      identifier: "types",
                      position: (29, 18),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "str",
                        position: (29, 24),
                       },
                      ],
                     },
                     default: None,
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "description",
                       position: (30, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "The amount of memory reserved for the crashdump kernel.\nIf you choose a too high value, dmesg will mention\n\"crashkernel reservation failed\".\n",
                       position: (31, 1),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (27, 35),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "kernelParams",
                  position: (36, 9),
                 },
                ],
               },
               FunctionApplication {
                function: Variable {
                 identifier: "mkOption",
                 position: (36, 24),
                },
                arguments: [
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "type",
                       position: (37, 11),
                      },
                     ],
                    },
                    FunctionApplication {
                     function: PropertyAccess {
                      expression: Variable {
                       identifier: "types",
                       position: (37, 18),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "listOf",
                         position: (37, 24),
                        },
                       ],
                      },
                      default: None,
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "types",
                        position: (37, 31),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "str",
                          position: (37, 37),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "default",
                       position: (38, 11),
                      },
                     ],
                    },
                    List {
                     elements: [
                      String {
                       parts: [
                        Raw {
                         content: "1",
                         position: (38, 24),
                        },
                       ],
                      },
                      String {
                       parts: [
                        Raw {
                         content: "boot.shell_on_fail",
                         position: (38, 28),
                        },
                       ],
                      },
                     ],
                     position: (38, 21),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "description",
                       position: (39, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "Parameters that will be passed to the kernel kexec-ed on crash.\n",
                       position: (40, 1),
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (36, 33),
                 },
                ],
               },
              ),
             ],
             recursive: false,
             position: (15, 19),
            },
           ),
          ],
          recursive: false,
          position: (14, 12),
         },
        ),
       ],
       recursive: false,
       position: (13, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (49, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (49, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "crashdump",
          position: (49, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (49, 27),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (50, 5),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "postBootCommands",
                 position: (51, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "echo \"loading crashdump kernel...\";\n",
                 position: (52, 1),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (53, 11),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "kexec-tools",
                     position: (53, 16),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/sbin/kexec -p /run/current-system/kernel \\\n--initrd=/run/current-system/initrd \\\n--reset-vga --console-vga \\\n--command-line=\"init=$(readlink -f /run/current-system/init) irqpoll maxcpus=1 reset_devices ",
                 position: (53, 28),
                },
                Expression {
                 expression: Variable {
                  identifier: "kernelParams",
                  position: (56, 104),
                 },
                },
                Raw {
                 content: "\"\n",
                 position: (56, 117),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "kernelParams",
                 position: (58, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "crashkernel=",
                   position: (59, 9),
                  },
                  Expression {
                   expression: PropertyAccess {
                    expression: Variable {
                     identifier: "crashdump",
                     position: (59, 23),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "reservedMemory",
                       position: (59, 33),
                      },
                     ],
                    },
                    default: None,
                   },
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "nmi_watchdog=panic",
                   position: (60, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "softlockup_panic=1",
                   position: (61, 9),
                  },
                 ],
                },
               ],
               position: (58, 22),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "kernelPatches",
                 position: (63, 7),
                },
               ],
              },
              List {
               elements: [
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "name",
                      position: (64, 9),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "crashdump-config",
                      position: (64, 17),
                     },
                    ],
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "patch",
                      position: (65, 9),
                     },
                    ],
                   },
                   Variable {
                    identifier: "null",
                    position: (65, 17),
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "extraConfig",
                      position: (66, 9),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "CRASH_DUMP y\nDEBUG_INFO y\nPROC_VMCORE y\nLOCKUP_DETECTOR y\nHARDLOCKUP_DETECTOR y\n",
                      position: (67, 1),
                     },
                    ],
                   },
                  ),
                 ],
                 recursive: false,
                 position: (63, 25),
                },
               ],
               position: (63, 23),
              },
             ),
            ],
            recursive: false,
            position: (50, 12),
           },
          ),
         ],
         recursive: false,
         position: (49, 34),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (12, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}