haios/modules/nixos/boot/plymouth.nix
2025-02-17 20:46:20 +02:00

31 lines
693 B
Nix

{
lib,
pkgs,
inputs',
config,
...
}: let
inherit (lib.meta) getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.olympus.system.boot.plymouth;
in {
options.olympus.system.boot.plymouth.enable = mkEnableOption "plymouth boot splash";
config = mkIf cfg.enable {
boot.plymouth = {
enable = true;
theme = "mikuboot";
themePackages = [
inputs'.haipkgs.packages.mikuboot
];
};
# make plymouth work with sleep
powerManagement = {
powerDownCommands = "${getExe' pkgs.plymouth "plymouth"} --show-splash";
resumeCommands = "${getExe' pkgs.plymouth "plymouth"} --quit";
};
};
}