Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active April 24, 2020 06:09
Show Gist options
  • Save cleverca22/4f7aef71605d7f79650845ab5616fa82 to your computer and use it in GitHub Desktop.
Save cleverca22/4f7aef71605d7f79650845ab5616fa82 to your computer and use it in GitHub Desktop.
{ pkgs, ... }:
{
boot.loader.grub.extraEntries = ''
menuentry "Nixos with custom kernel" {
linux ($drive1)/rescue-kernel init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
initrd ($drive1)/rescue-initrd
}
'';
boot.loader.grub.extraFiles = {
"rescue-kernel" = /home/custom/bzImage;
"rescue-initrd" = "${config.system.build.initialRamdisk}/initrd";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment