41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ pkgs, lib, config, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.modules.desktop.plymouth;
|
|
in {
|
|
options.modules.desktop.plymouth = {
|
|
enable = mkEnableOption "Enable plymouth, a graphical boot splash screen";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
boot.plymouth = {
|
|
enable = true;
|
|
|
|
themePackages = [ config.modules.desktop.themes.plymouthTheme.package ];
|
|
theme = config.modules.desktop.themes.plymouthTheme.name;
|
|
};
|
|
boot.kernelParams = [ "plymouth.use-simpledrm" ];
|
|
|
|
# smooth transition from plymouth to the login manager
|
|
# honestly, i have No Clue what this does, but it's in the arch wiki so it must be good
|
|
# https://wiki.archlinux.org/title/Plymouth#Smooth_transition
|
|
# we aren't actually replacing anything here, nix merges it into the existing service for us :3
|
|
systemd.services.display-manager = {
|
|
conflicts = [ "plymouth-quit.service" ];
|
|
after = [
|
|
"plymouth-quit.service"
|
|
"plymouth-start.service"
|
|
"systemd-user-sessions.service"
|
|
];
|
|
onFailure = [ "plymouth-quit.service" ];
|
|
|
|
serviceConfig = {
|
|
ExecStartPost = [
|
|
"-${pkgs.coreutils}/bin/sleep 30"
|
|
"-${pkgs.plymouth}/bin/plymouth quit --retain-splash"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|