nixdots/system/shared/boot/plymouth.nix

39 lines
738 B
Nix
Raw Normal View History

2024-07-26 23:07:07 +00:00
{
config,
lib,
pkgs,
...
}: let
2024-04-12 21:28:50 +00:00
inherit (lib) mkIf;
cfg = config.myOptions.system.boot.plymouth;
in {
config = mkIf cfg.enable {
boot = {
2024-07-26 23:07:07 +00:00
plymouth =
{
enable = true;
theme = cfg.selectedTheme;
}
// lib.optionalAttrs cfg.withThemes {
themePackages = [
(pkgs.adi1090x-plymouth-themes.override {
selected_themes = [cfg.selectedTheme];
})
];
};
kernelParams = ["splash"];
2024-04-12 21:28:50 +00:00
};
# Make polymouth work with sleep
powerManagement = {
powerDownCommands = ''
${pkgs.plymouth} --show-splash
'';
resumeCommands = ''
${pkgs.plymouth} --quit
'';
};
};
}