dotfiles/modules/nixos/hardware/boot.nix

49 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2022-12-21 21:18:03 +00:00
{ config, pkgs, lib, ... }: {
2022-04-29 02:25:05 +00:00
boot.loader = lib.mkIf (config.physical && !config.server) {
grub = {
enable = true;
2022-04-29 02:25:05 +00:00
# Not sure what this does, but it involves the UEFI/BIOS
efiSupport = true;
# Check for other OSes and make them available
useOSProber = true;
2022-10-29 03:58:25 +00:00
# Attempt to display GRUB on widescreen monitor
gfxmodeEfi = "1920x1080";
# Limit the total number of configurations to rollback
configurationLimit = 25;
# Install GRUB onto the boot disk
# device = config.fileSystems."/boot".device;
# Don't install GRUB, required for UEFI?
device = "nodev";
2022-06-14 10:38:34 +00:00
# Display menu indefinitely if holding shift key
extraConfig = ''
if keystatus --shift ; then
set timeout=-1
else
set timeout=0
fi
'';
};
2022-06-14 10:38:34 +00:00
# Always display menu indefinitely; default is 5 seconds
# timeout = null;
# Allows GRUB to interact with the UEFI/BIOS I guess
efi.canTouchEfiVariables = true;
};
2023-02-17 23:15:23 +00:00
# Allow reading from Windows drives
boot.supportedFilesystems = lib.mkIf config.physical [ "ntfs" ];
2023-02-17 23:15:23 +00:00
2023-02-22 01:28:43 +00:00
# Use latest released Linux kernel by default
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
2022-04-29 02:25:05 +00:00
}