{ 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 = 0; efi.canTouchEfiVariables = true; grub = { enable = true; efiSupport = true; device = "nodev"; gfxmodeEfi = config.mods.monitors.primary.config.mode; }; }; }; }