nix-flakes/modules/mizukios/features/system/boot.nix
2026-08-02 20:03:19 +09:00

46 lines
1.2 KiB
Nix

{ pkgs, ... }:
{
# boot.plymouth.enable = true;
boot.loader = {
grub = {
enable = true;
efiSupport = true;
useOSProber = true;
efiInstallAsRemovable = true;
device = "nodev";
enableCryptodisk = true;
# extraInstallCommands = ''
# mkdir -p /boot/EFI/BOOT
# cp -f /boot/EFI/NixOS-boot/grubx64.efi /boot/EFI/BOOT/BOOTX64.EFI
# '';
default = "saved";
extraConfig = ''
GRUB_SAVEDEFAULT=true
'';
extraEntries = ''
menuentry "netboot.xyz" --class netboot {
search --no-floppy --file --set=root /EFI/netboot.xyz/netboot.xyz.efi
chainloader /EFI/netboot.xyz/netboot.xyz.efi
}
'';
extraInstallCommands = ''
install -Dm0644 ${pkgs.fetchurl {
url = "https://boot.netboot.xyz/ipxe/netboot.xyz.efi";
hash = "sha256-ZoAa7s8Xqru8n+ECKjRYg3uzbXTUe02ip+OqeYseM+s=";
}} /boot/EFI/netboot.xyz/netboot.xyz.efi
'';
};
# efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot";
};
boot.initrd.systemd.enable = true;
boot.initrd.systemd.emergencyAccess = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
}