Add polymouth

This commit is contained in:
ItsDrike 2024-04-12 23:28:50 +02:00
parent 5514ffb24d
commit 97680bd24e
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
5 changed files with 62 additions and 0 deletions

View file

@ -4,5 +4,6 @@ _: {
./generic.nix
./secure-boot.nix
./initrd.nix
./plymouth.nix
];
}

28
system/boot/plymouth.nix Normal file
View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, ...}: let
inherit (lib) mkIf;
cfg = config.myOptions.system.boot.plymouth;
in {
config = mkIf cfg.enable {
boot.plymouth = {
enable = true;
theme = cfg.selectedTheme;
}
// lib.optionalAttrs cfg.withThemes {
themePackages = [
(pkgs.adi1090x-plymouth-themes.override {
selected_themes = [ cfg.selectedTheme ];
})
];
};
# Make polymouth work with sleep
powerManagement = {
powerDownCommands = ''
${pkgs.plymouth} --show-splash
'';
resumeCommands = ''
${pkgs.plymouth} --quit
'';
};
};
}