mirror of
https://github.com/Ascyii/nixos.git
synced 2026-01-01 06:44:26 -05:00
Cleanup of code and modules. Fully modular config now. Cleanup unused and redundant packages. Fix shell alias
This commit is contained in:
26
modules/hardware/boot.nix
Normal file
26
modules/hardware/boot.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ 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 = if config.bootMode == "uefi" then {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
timeout = 0;
|
||||
} else {
|
||||
grub.enable = true;
|
||||
grub.device = "/dev/sda";
|
||||
timeout = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user