mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
split boot module
This commit is contained in:
parent
1cfe7ab312
commit
49283fab73
2 changed files with 52 additions and 36 deletions
|
|
@ -1,55 +1,29 @@
|
||||||
{
|
{
|
||||||
self',
|
|
||||||
lib,
|
lib,
|
||||||
config,
|
self',
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
options.local.bootConfig.disable = lib.mkEnableOption "";
|
options.local.bootConfig.disable = lib.mkEnableOption "";
|
||||||
|
|
||||||
config = lib.mkIf (!config.local.bootConfig.disable) {
|
config = lib.mkIf (!config.local.bootConfig.disable) {
|
||||||
environment.etc = {
|
|
||||||
"issue" = {
|
|
||||||
text = "[?12l[?25h";
|
|
||||||
mode = "0444";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
boot = {
|
boot = {
|
||||||
blacklistedKernelModules = [ "pcspkr" ];
|
|
||||||
kernelParams = lib.mkBefore [
|
|
||||||
"logo.nologo"
|
|
||||||
"fbcon=nodefer"
|
|
||||||
"bgrt_disable"
|
|
||||||
"vt.global_cursor_default=0"
|
|
||||||
"quiet"
|
|
||||||
"systemd.show_status=false"
|
|
||||||
"rd.udev.log_level=3"
|
|
||||||
"splash"
|
|
||||||
];
|
|
||||||
consoleLogLevel = 3;
|
|
||||||
initrd = {
|
|
||||||
verbose = false;
|
|
||||||
systemd.enable = true;
|
|
||||||
};
|
|
||||||
plymouth = {
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
theme = "breeze";
|
|
||||||
logo = "${self'.packages.images}/logo.png";
|
|
||||||
};
|
|
||||||
loader = {
|
loader = {
|
||||||
grub = {
|
grub.configurationLimit = 10;
|
||||||
configurationLimit = 10;
|
|
||||||
extraConfig = ''
|
|
||||||
GRUB_TIMEOUT_STYLE=hidden
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
configurationLimit = 10;
|
configurationLimit = 10;
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
consoleMode = "max";
|
consoleMode = "max";
|
||||||
editor = false;
|
editor = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
efi.canTouchEfiVariables = lib.mkDefault true;
|
efi.canTouchEfiVariables = lib.mkDefault true;
|
||||||
timeout = 0;
|
};
|
||||||
|
plymouth = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
theme = "breeze";
|
||||||
|
logo = "${self'.packages.images}/logo.png";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.efibootmgr = {
|
systemd.services.efibootmgr = {
|
||||||
42
modules/boot/silent.nix
Normal file
42
modules/boot/silent.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{ lib }:
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Lots taken from here
|
||||||
|
https://wiki.archlinux.org/title/Silent_boot
|
||||||
|
*/
|
||||||
|
environment.etc.issue = {
|
||||||
|
/*
|
||||||
|
Turns the cursor back on in the TTY
|
||||||
|
It's the output of this commmand
|
||||||
|
setterm -cursor on
|
||||||
|
*/
|
||||||
|
|
||||||
|
text = "[?12l[?25h";
|
||||||
|
mode = "0444";
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
kernelParams = lib.mkBefore [
|
||||||
|
"fbcon=nodefer" # Wipes the vendor logo earlier
|
||||||
|
"vt.global_cursor_default=0" # Stops cursor blinking while booting
|
||||||
|
"quiet" # Less log messages
|
||||||
|
"systemd.show_status=auto" # Only show systemd errors
|
||||||
|
"udev.log_level=3" # Only show udev errors
|
||||||
|
"splash" # Show splash
|
||||||
|
];
|
||||||
|
consoleLogLevel = 3; # Only errors
|
||||||
|
initrd = {
|
||||||
|
verbose = false; # Less stage1 messages
|
||||||
|
systemd.enable = true; # Use systemd initrd
|
||||||
|
};
|
||||||
|
# Hide grub (if it's being used)
|
||||||
|
loader.grub.extraConfig = ''
|
||||||
|
GRUB_TIMEOUT_STYLE=hidden
|
||||||
|
GRUB_HIDDEN_TIMEOUT_QUIET=true
|
||||||
|
'';
|
||||||
|
/*
|
||||||
|
Not recommended
|
||||||
|
rolling back can be a pain
|
||||||
|
*/
|
||||||
|
#timeout = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue