flake/modules/nixos/core/boot.nix
2025-07-31 00:34:46 +00:00

23 lines
595 B
Nix

{ pkgs, lib, config, ... }: {
options.mods = {
boot.enable = lib.mkEnableOption {
description = "enables grub";
default = true;
};
};
config = lib.mkIf config.mods.boot.enable {
boot.loader = lib.mkIf config.mods.xorg.enable {
timeout = 2;
efi.canTouchEfiVariables = true;
grub = {
enable = lib.mkDefault true;
zfsSupport = true;
efiSupport = true;
device = "nodev";
} // lib.optionalAttrs (config.mods.monitors != { }) {
gfxmodeEfi = config.mods.monitors.primary.config.mode;
};
};
};
}