From f037c63d840c58f1b8b0a49cea30f365a96b44a0 Mon Sep 17 00:00:00 2001 From: Bloxx12 Date: Wed, 9 Apr 2025 15:31:18 +0200 Subject: [PATCH] boot/module.nix: cleanup, add plymouth --- modules/system/boot/module.nix | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/modules/system/boot/module.nix b/modules/system/boot/module.nix index bc3eeb1..dbc245b 100644 --- a/modules/system/boot/module.nix +++ b/modules/system/boot/module.nix @@ -18,6 +18,7 @@ in { Set the boot loader's timeout. This is 0 by default, but preferably longer on remote servers to make switching to previous generations easier. ''; type = int; + # I love spamming space default = 0; }; }; @@ -35,16 +36,20 @@ in { boot = { tmp.useTmpfs = true; initrd = { - verbose = true; + verbose = false; systemd.enable = true; }; loader = { efi.canTouchEfiVariables = true; - # I love spamming space timeout = cfg.timeout; systemd-boot = { enable = cfg.systemd-boot.enable; + # INFO: Leaving this enabled is a security vulneratibility, + # since we can just start /bin/sh from there and get root access. + # Since I have FDE, this isn't _as_ critical, but it would still be + # a bad idea to leave it enabled editor = mkForce false; + consoleMode = "auto"; configurationLimit = 5; }; grub = { @@ -55,11 +60,25 @@ in { }; }; plymouth = { - enable = false; - # font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf"; - themePackages = [pkgs.plymouth-matrix-theme]; - theme = "matrix"; + enable = true; + themePackages = [ + (pkgs.adi1090x-plymouth-themes.override + { + selected_themes = [ + "hud_3" + ]; + }) + ]; + theme = "hud_3"; }; }; + powerManagement = { + powerDownCommands = '' + ${pkgs.plymouth} --show-splash + ''; + resumeCommands = '' + ${pkgs.plymouth} --quit + ''; + }; }; }