again
This commit is contained in:
43
modules/nixos/system/boot/default.nix
Normal file
43
modules/nixos/system/boot/default.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = config.${namespace}.system.boot;
|
||||
in
|
||||
{
|
||||
options.${namespace}.system.boot = {
|
||||
enable = lib.mkEnableOption "booting";
|
||||
silentBoot = lib.mkEnableOption "silent boot";
|
||||
showNotch = lib.mkEnableOption "show macOS notch";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot = {
|
||||
kernelParams = lib.optionals cfg.silentBoot [
|
||||
"quiet"
|
||||
"loglevel=3"
|
||||
"udev.log_level=3"
|
||||
"rd.udev.log_level=3"
|
||||
"systemd.show_status=auto"
|
||||
"rd.systemd.show_status=auto"
|
||||
"vt.global_cursor_default=0"
|
||||
] ++ lib.optionals cfg.showNotch [
|
||||
"apple_dcp.show_notch=1"
|
||||
];
|
||||
|
||||
loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = false;
|
||||
};
|
||||
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 20;
|
||||
editor = false;
|
||||
};
|
||||
|
||||
timeout = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user