Files
nix-config/modules/boot/plymouth.org
T
phundrak ba018ef841 refactor: change to litterate config
Configuration is now held by the `.org` files. All `.nix` files are
tangled from the org-mode files.
2026-10-06 12:40:58 +02:00

2.6 KiB
Raw Blame History

Plymouth

Plymouth

Plymouth is a utility which shows an animation at startup or when powering off a device, instead of showing only terminal things. My Plymouth settings are set in the nixos.plymouth module.

{
  flake.modules.nixos.plymouth = {pkgs, ...}: {
    boot = {
      <<plymouth>>
      <<kernel-parameters>>
      <<quiet-console>>
      <<no-menu>>
    };
  };
}

Quieting Down the Console

First, I need to set a few kernel parameters to make displaying Plymouth possible:

quiet
silences the logs in the terminal
splash
show the splash screen (in our case, Plymouth)
boot.shell_on_fail
sets allowShell=1, which permits the fail() handler to drop an interactive rescue shell if stage-1 boot fails
udev.log_level=3
sets udev’s log level to err
rd.systemd.show_status=auto
suppress systemd status messages in initrd unless boot is significantly delayed
(mapconcat (lambda (param)
             (format "\"%s\""
                     (s-chop-suffix "=" (s-chop-prefix "=" (car (s-split " ::" param))))))
           params
           "\n")
"quiet"
"splash"
"boot.shell_on_fail"
"udev.log_level=3"
"rd.systemd.show_status=auto"

This translates into:

kernelParams = [
  <<kernel-params()>>
];

To further decrease the verbosity of the booting screen, we can deactivate initrd’s verbosity and lower the console’s log level to err.

consoleLogLevel = 3;
initrd.verbose = false;

And we’ll show Plymouth immediately, skipping the bootloader’s menu. We can hold a key to force displaying the menu, though.

loader.timeout = 0;

Configuring Plymouth

Now, we can configure Plymouth proper.

plymouth = {
  enable = true;
  <<plymouth-theme>>
};

The only significant configuration I want to change in Plymouth is the animation. I really like how it looks. You can find a preview of it in adi1090x's repository, under the first pack. For this, I need to set a theme package and the theme name.

theme = "circle_hud";
themePackages = with pkgs; [
  (adi1090x-plymouth-themes.override {
    selected_themes = ["circle_hud"];
  })
];

And we’re done!