nixos/modules/plymouth.nix

53 lines
1.2 KiB
Nix

# Yoinky Sploinky https://git.nullcube.net/nullcube/nixos/src/commit/d732b27507e70ed6f37e51ea2e5f8b7d7b3582dc/nixosModules/plymouth.nix
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.snowhawk.plymouth;
in
{
options.snowhawk.plymouth = {
enable = mkEnableOption "plymouth module";
theme = mkOption {
default = "spinner_alt";
example = "circle";
description = ''
The plymouth theme to download and activate
'';
};
loaderTimeout = mkOption {
default = 5;
example = 0;
description = ''
The timeout for the bootloader select screen
'';
};
};
config = mkIf cfg.enable {
boot = {
plymouth = {
enable = true;
theme = cfg.theme;
themePackages = mkDefault [
(pkgs.adi1090x-plymouth-themes.override {
selected_themes = [ cfg.theme ];
})
];
};
consoleLogLevel = 0;
initrd.verbose = false;
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"loglevel=3"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
loader.timeout = cfg.loaderTimeout;
};
};
}