Files
dotfiles/system-modules/grub.nix
Lennart J. Kurzweg (Nx2) b93a75fa97 email broken
2024-04-16 18:20:09 +02:00

45 lines
1.3 KiB
Nix

{ config, pkgs, host, ... }:
let
grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.nx2.site";
owner = "nx2";
repo = "grub-theme-ascii-diana";
rev = "0.5.0";
hash = "sha256-e+55NYsSsWY6GPbYUtdVEB9krueuCAWT3Ce/Ghops1g=";
});
in
{
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub = {
enable = true;
configurationLimit = 30;
# device = "/dev/nvme0n1p1";
device = "nodev";
# useOSProber = true;
efiSupport = true;
# theme = pkgs.sleek-grub-theme;
theme = grub-theme-ascii-diana;
font = "${grub-theme-ascii-diana}/unicode.pf2";
fontSize = 50;
splashImage = null;
extraEntries = if host == "NxXPS" then ''
menuentry 'Windows 11' --class windows --class os $menuentry_id_option 'osprober-efi-0A97-7A2D' {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 0A97-7A2D
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
'' else ''
menuentry 'Windows 11' --class windows --class os $menuentry_id_option 'osprober-efi-8932-4A3D' {
insmod part_gpt
insmod fat
search --no-floppy --label --set=root EFI
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
'';
};
}