nixos/modules/nixos/hardware/boot.nix

28 lines
630 B
Nix

{ config, pkgs, lib, ... }:
{
boot.loader = lib.mkIf (config.physical) {
grub = {
enable = true;
efiSupport = true;
useOSProber = true;
gfxmodeEfi = "1920x1080";
configurationLimit = 25;
device = "nodev";
# Display menu indefinitely if holding shift key
extraConfig = ''
if keystatus --shift; then
set timeout=-1
else
set timeout=3
fi
'';
};
efi.canTouchEfiVariables = true;
};
boot.supportedFilesystems = lib.mkIf config.physical [ "ntfs" ];
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
}