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 {
|
2024-04-13 16:14:32 +00:00
|
|
|
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];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2024-04-13 16:14:32 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|