Files
nixos/modules/hardware/boot.nix
2025-09-18 12:39:26 +02:00

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";
});
};
}