{ 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
      '';
    };
    # efi.canTouchEfiVariables = true;
    efi.efiSysMountPoint = "/boot";
  };

  boot.initrd.systemd.enable = true;
  boot.initrd.systemd.emergencyAccess = true;

  boot.kernelPackages = pkgs.linuxPackages_latest;
}
