mirror of
https://github.com/Ascyii/nixos.git
synced 2026-01-01 14:54:26 -05:00
26 lines
510 B
Nix
26 lines
510 B
Nix
{ config, lib, ... }:
|
|
|
|
let inherit (lib) mkOption types;
|
|
in {
|
|
options.bootMode = mkOption {
|
|
type = types.enum [ "uefi" "legacy" ];
|
|
default = "uefi";
|
|
};
|
|
|
|
config = {
|
|
boot.consoleLogLevel = 0;
|
|
boot.kernelParams = [ "quiet" "udev.log_level=3" ];
|
|
|
|
boot.loader = {
|
|
timeout = 0;
|
|
} // (if config.bootMode == "uefi" then {
|
|
efi.canTouchEfiVariables = true;
|
|
systemd-boot.enable = true;
|
|
} else {
|
|
grub.enable = true;
|
|
grub.device = "/dev/sda";
|
|
});
|
|
};
|
|
}
|
|
|