{ config, lib, pkgs, modulesPath, ... }: { boot.kernelPackages = pkgs.linuxPackages_latest; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; boot.loader.systemd-boot.enable = lib.mkForce false; boot.loader.efi.canTouchEfiVariables = lib.mkForce false; boot.loader.grub = { enable = true; device = "/dev/sda"; efiSupport = true; efiInstallAsRemovable = true;# CRITICAL: This overwrites /boot/EFI/BOOT/BOOTX64.EFI }; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; boot.initrd.kernelModules = [ "nvme" ]; fileSystems."/" = { device = "/dev/sda3"; fsType = "btrfs"; }; fileSystems."/boot" = { device = "/dev/sda2"; fsType = "vfat"; options = [ "defaults" ]; }; }