2021-05-09 02:09:18 -04:00

30 lines
553 B
Nix

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.bios;
in {
options.bios = {
enable = mkEnableOption "enable bios boot";
device = mkOption {
type = types.str;
};
};
config = mkIf cfg.enable {
# Enable microcode
firmware.x86_64 = true;
# Use GRUB 2 for BIOS
boot.loader = {
timeout = 2;
grub = {
enable = true;
device = cfg.device;
version = 2;
useOSProber = true;
configurationLimit = 20;
theme = pkgs.nixos-grub2-theme;
};
};
};
}