2021-12-19 01:06:50 +00:00
|
|
|
{ config, lib, options, pkgs, ... }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
plymouth = pkgs.plymouth.override {
|
|
|
|
systemd = config.boot.initrd.systemd.package;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cfg = config.boot.plymouth;
|
2021-12-19 01:06:50 +00:00
|
|
|
opt = options.boot.plymouth;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nixosBreezePlymouth = pkgs.plasma5Packages.breeze-plymouth.override {
|
2020-04-24 23:36:52 +00:00
|
|
|
logoFile = cfg.logo;
|
|
|
|
logoName = "nixos";
|
|
|
|
osName = "NixOS";
|
|
|
|
osVersion = config.system.nixos.release;
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
plymouthLogos = pkgs.runCommand "plymouth-logos" { inherit (cfg) logo; } ''
|
|
|
|
mkdir -p $out
|
|
|
|
|
|
|
|
# For themes that are compiled with PLYMOUTH_LOGO_FILE
|
|
|
|
mkdir -p $out/etc/plymouth
|
|
|
|
ln -s $logo $out/etc/plymouth/logo.png
|
|
|
|
|
|
|
|
# Logo for bgrt theme
|
|
|
|
# Note this is technically an abuse of watermark for the bgrt theme
|
|
|
|
# See: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/95#note_813768
|
|
|
|
mkdir -p $out/share/plymouth/themes/spinner
|
|
|
|
ln -s $logo $out/share/plymouth/themes/spinner/watermark.png
|
|
|
|
|
|
|
|
# Logo for spinfinity theme
|
|
|
|
# See: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/106
|
|
|
|
mkdir -p $out/share/plymouth/themes/spinfinity
|
|
|
|
ln -s $logo $out/share/plymouth/themes/spinfinity/header-image.png
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
themesEnv = pkgs.buildEnv {
|
|
|
|
name = "plymouth-themes";
|
2021-03-09 03:18:52 +00:00
|
|
|
paths = [
|
|
|
|
plymouth
|
|
|
|
plymouthLogos
|
|
|
|
] ++ cfg.themePackages;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configFile = pkgs.writeText "plymouthd.conf" ''
|
|
|
|
[Daemon]
|
|
|
|
ShowDelay=0
|
2021-03-09 03:18:52 +00:00
|
|
|
DeviceTimeout=8
|
2020-04-24 23:36:52 +00:00
|
|
|
Theme=${cfg.theme}
|
|
|
|
${cfg.extraConfig}
|
|
|
|
'';
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
boot.plymouth = {
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
enable = mkEnableOption "Plymouth boot splash screen";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-22 21:28:39 +00:00
|
|
|
font = mkOption {
|
|
|
|
default = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf";
|
2021-10-06 13:57:05 +00:00
|
|
|
defaultText = literalExpression ''"''${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf"'';
|
2021-02-22 21:28:39 +00:00
|
|
|
type = types.path;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2021-02-22 21:28:39 +00:00
|
|
|
Font file made available for displaying text on the splash screen.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
themePackages = mkOption {
|
2021-03-09 03:18:52 +00:00
|
|
|
default = lib.optional (cfg.theme == "breeze") nixosBreezePlymouth;
|
2022-09-09 14:08:57 +00:00
|
|
|
defaultText = literalMD ''
|
2021-12-19 01:06:50 +00:00
|
|
|
A NixOS branded variant of the breeze theme when
|
2022-09-09 14:08:57 +00:00
|
|
|
`config.${opt.theme} == "breeze"`, otherwise
|
|
|
|
`[ ]`.
|
2021-12-19 01:06:50 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
type = types.listOf types.package;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
Extra theme packages for plymouth.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
theme = mkOption {
|
2021-03-09 03:18:52 +00:00
|
|
|
default = "bgrt";
|
2020-04-24 23:36:52 +00:00
|
|
|
type = types.str;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
Splash screen theme.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
logo = mkOption {
|
|
|
|
type = types.path;
|
2021-03-09 03:18:52 +00:00
|
|
|
# Dimensions are 48x48 to match GDM logo
|
2024-04-21 15:54:59 +00:00
|
|
|
default = "${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png";
|
|
|
|
defaultText = literalExpression ''"''${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png"'';
|
2023-07-15 17:15:38 +00:00
|
|
|
example = literalExpression ''
|
|
|
|
pkgs.fetchurl {
|
|
|
|
url = "https://nixos.org/logo/nixos-hires.png";
|
|
|
|
sha256 = "1ivzgd7iz0i06y36p8m5w48fd8pjqwxhdaavc0pxs7w1g7mcy5si";
|
|
|
|
}
|
|
|
|
'';
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
Logo which is displayed on the splash screen.
|
2024-04-21 15:54:59 +00:00
|
|
|
Currently supports PNG file format only.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
extraConfig = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
Literal string to append to `configFile`
|
2020-04-24 23:36:52 +00:00
|
|
|
and the config file generated by the plymouth module.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
boot.kernelParams = [ "splash" ];
|
|
|
|
|
|
|
|
# To be discoverable by systemd.
|
|
|
|
environment.systemPackages = [ plymouth ];
|
|
|
|
|
|
|
|
environment.etc."plymouth/plymouthd.conf".source = configFile;
|
|
|
|
environment.etc."plymouth/plymouthd.defaults".source = "${plymouth}/share/plymouth/plymouthd.defaults";
|
|
|
|
environment.etc."plymouth/logo.png".source = cfg.logo;
|
|
|
|
environment.etc."plymouth/themes".source = "${themesEnv}/share/plymouth/themes";
|
|
|
|
# XXX: Needed because we supply a different set of plugins in initrd.
|
|
|
|
environment.etc."plymouth/plugins".source = "${plymouth}/lib/plymouth";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"d /run/plymouth 0755 root root 0 -"
|
|
|
|
"L+ /run/plymouth/plymouthd.defaults - - - - /etc/plymouth/plymouthd.defaults"
|
|
|
|
"L+ /run/plymouth/themes - - - - /etc/plymouth/themes"
|
|
|
|
"L+ /run/plymouth/plugins - - - - /etc/plymouth/plugins"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
systemd.packages = [ plymouth ];
|
|
|
|
|
|
|
|
systemd.services.plymouth-kexec.wantedBy = [ "kexec.target" ];
|
|
|
|
systemd.services.plymouth-halt.wantedBy = [ "halt.target" ];
|
|
|
|
systemd.services.plymouth-quit-wait.wantedBy = [ "multi-user.target" ];
|
|
|
|
systemd.services.plymouth-quit.wantedBy = [ "multi-user.target" ];
|
|
|
|
systemd.services.plymouth-poweroff.wantedBy = [ "poweroff.target" ];
|
|
|
|
systemd.services.plymouth-reboot.wantedBy = [ "reboot.target" ];
|
|
|
|
systemd.services.plymouth-read-write.wantedBy = [ "sysinit.target" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
systemd.services.systemd-ask-password-plymouth.wantedBy = [ "multi-user.target" ];
|
|
|
|
systemd.paths.systemd-ask-password-plymouth.wantedBy = [ "multi-user.target" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
# Prevent Plymouth taking over the screen during system updates.
|
|
|
|
systemd.services.plymouth-start.restartIfChanged = false;
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
boot.initrd.systemd = {
|
|
|
|
extraBin.plymouth = "${plymouth}/bin/plymouth"; # for the recovery shell
|
|
|
|
storePaths = [
|
|
|
|
"${lib.getBin config.boot.initrd.systemd.package}/bin/systemd-tty-ask-password-agent"
|
|
|
|
"${plymouth}/bin/plymouthd"
|
|
|
|
"${plymouth}/sbin/plymouthd"
|
|
|
|
];
|
|
|
|
packages = [ plymouth ]; # systemd units
|
|
|
|
contents = {
|
|
|
|
# Files
|
|
|
|
"/etc/plymouth/plymouthd.conf".source = configFile;
|
|
|
|
"/etc/plymouth/logo.png".source = cfg.logo;
|
2023-07-15 17:15:38 +00:00
|
|
|
"/etc/plymouth/plymouthd.defaults".source = "${plymouth}/share/plymouth/plymouthd.defaults";
|
2022-05-18 14:49:53 +00:00
|
|
|
# Directories
|
|
|
|
"/etc/plymouth/plugins".source = pkgs.runCommand "plymouth-initrd-plugins" {} ''
|
|
|
|
# Check if the actual requested theme is here
|
|
|
|
if [[ ! -d ${themesEnv}/share/plymouth/themes/${cfg.theme} ]]; then
|
|
|
|
echo "The requested theme: ${cfg.theme} is not provided by any of the packages in boot.plymouth.themePackages"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
moduleName="$(sed -n 's,ModuleName *= *,,p' ${themesEnv}/share/plymouth/themes/${cfg.theme}/${cfg.theme}.plymouth)"
|
|
|
|
|
|
|
|
mkdir -p $out/renderers
|
|
|
|
# module might come from a theme
|
2023-07-15 17:15:38 +00:00
|
|
|
cp ${themesEnv}/lib/plymouth/*.so $out
|
|
|
|
cp ${plymouth}/lib/plymouth/renderers/*.so $out/renderers
|
2024-02-29 20:09:43 +00:00
|
|
|
# useless in the initrd, and adds several megabytes to the closure
|
|
|
|
rm $out/renderers/x11.so
|
2022-05-18 14:49:53 +00:00
|
|
|
'';
|
|
|
|
"/etc/plymouth/themes".source = pkgs.runCommand "plymouth-initrd-themes" {} ''
|
|
|
|
# Check if the actual requested theme is here
|
|
|
|
if [[ ! -d ${themesEnv}/share/plymouth/themes/${cfg.theme} ]]; then
|
|
|
|
echo "The requested theme: ${cfg.theme} is not provided by any of the packages in boot.plymouth.themePackages"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
mkdir -p $out/${cfg.theme}
|
|
|
|
cp -r ${themesEnv}/share/plymouth/themes/${cfg.theme}/* $out/${cfg.theme}
|
2022-05-18 14:49:53 +00:00
|
|
|
# Copy more themes if the theme depends on others
|
2023-07-15 17:15:38 +00:00
|
|
|
for theme in $(grep -hRo '/share/plymouth/themes/.*$' $out | xargs -n1 basename); do
|
2022-08-12 12:06:08 +00:00
|
|
|
if [[ -d "${themesEnv}/share/plymouth/themes/$theme" ]]; then
|
|
|
|
if [[ ! -d "$out/$theme" ]]; then
|
|
|
|
echo "Adding dependent theme: $theme"
|
2023-07-15 17:15:38 +00:00
|
|
|
mkdir -p "$out/$theme"
|
|
|
|
cp -r "${themesEnv}/share/plymouth/themes/$theme"/* "$out/$theme"
|
2022-08-12 12:06:08 +00:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "Missing theme dependency: $theme"
|
2022-05-18 14:49:53 +00:00
|
|
|
fi
|
|
|
|
done
|
2023-07-15 17:15:38 +00:00
|
|
|
# Fixup references
|
|
|
|
for theme in $out/*/*.plymouth; do
|
|
|
|
sed -i "s,${builtins.storeDir}/.*/share/plymouth/themes,$out," "$theme"
|
|
|
|
done
|
2022-05-18 14:49:53 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Fonts
|
|
|
|
"/etc/plymouth/fonts".source = pkgs.runCommand "plymouth-initrd-fonts" {} ''
|
|
|
|
mkdir -p $out
|
2024-07-31 10:19:44 +00:00
|
|
|
cp ${escapeShellArg cfg.font} $out
|
2022-05-18 14:49:53 +00:00
|
|
|
'';
|
|
|
|
"/etc/fonts/fonts.conf".text = ''
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
|
|
|
<fontconfig>
|
|
|
|
<dir>/etc/plymouth/fonts</dir>
|
|
|
|
</fontconfig>
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
# Properly enable units. These are the units that arch copies
|
|
|
|
services = {
|
|
|
|
plymouth-halt.wantedBy = [ "halt.target" ];
|
|
|
|
plymouth-kexec.wantedBy = [ "kexec.target" ];
|
|
|
|
plymouth-poweroff.wantedBy = [ "poweroff.target" ];
|
|
|
|
plymouth-quit-wait.wantedBy = [ "multi-user.target" ];
|
|
|
|
plymouth-quit.wantedBy = [ "multi-user.target" ];
|
|
|
|
plymouth-read-write.wantedBy = [ "sysinit.target" ];
|
|
|
|
plymouth-reboot.wantedBy = [ "reboot.target" ];
|
|
|
|
plymouth-start.wantedBy = [ "initrd-switch-root.target" "sysinit.target" ];
|
|
|
|
plymouth-switch-root-initramfs.wantedBy = [ "halt.target" "kexec.target" "plymouth-switch-root-initramfs.service" "poweroff.target" "reboot.target" ];
|
|
|
|
plymouth-switch-root.wantedBy = [ "initrd-switch-root.target" ];
|
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
# Link in runtime files before starting
|
|
|
|
services.plymouth-start.preStart = ''
|
|
|
|
mkdir -p /run/plymouth
|
|
|
|
ln -sf /etc/plymouth/{plymouthd.defaults,themes,plugins} /run/plymouth/
|
|
|
|
'';
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Insert required udev rules. We take stage 2 systemd because the udev
|
|
|
|
# rules are only generated when building with logind.
|
|
|
|
boot.initrd.services.udev.packages = [ (pkgs.runCommand "initrd-plymouth-udev-rules" {} ''
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
|
|
|
cp ${config.systemd.package.out}/lib/udev/rules.d/{70-uaccess,71-seat}.rules $out/etc/udev/rules.d
|
|
|
|
sed -i '/loginctl/d' $out/etc/udev/rules.d/71-seat.rules
|
|
|
|
'') ];
|
|
|
|
|
|
|
|
boot.initrd.extraUtilsCommands = lib.mkIf (!config.boot.initrd.systemd.enable) ''
|
2021-03-09 03:18:52 +00:00
|
|
|
copy_bin_and_libs ${plymouth}/bin/plymouth
|
|
|
|
copy_bin_and_libs ${plymouth}/bin/plymouthd
|
|
|
|
|
|
|
|
# Check if the actual requested theme is here
|
|
|
|
if [[ ! -d ${themesEnv}/share/plymouth/themes/${cfg.theme} ]]; then
|
|
|
|
echo "The requested theme: ${cfg.theme} is not provided by any of the packages in boot.plymouth.themePackages"
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
moduleName="$(sed -n 's,ModuleName *= *,,p' ${themesEnv}/share/plymouth/themes/${cfg.theme}/${cfg.theme}.plymouth)"
|
|
|
|
|
|
|
|
mkdir -p $out/lib/plymouth/renderers
|
|
|
|
# module might come from a theme
|
2023-07-15 17:15:38 +00:00
|
|
|
cp ${themesEnv}/lib/plymouth/*.so $out/lib/plymouth
|
|
|
|
cp ${plymouth}/lib/plymouth/renderers/*.so $out/lib/plymouth/renderers
|
2024-02-29 20:09:43 +00:00
|
|
|
# useless in the initrd, and adds several megabytes to the closure
|
|
|
|
rm $out/lib/plymouth/renderers/x11.so
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/plymouth/themes
|
|
|
|
cp ${plymouth}/share/plymouth/plymouthd.defaults $out/share/plymouth
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
# Copy themes into working directory for patching
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir themes
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
# Use -L to copy the directories proper, not the symlinks to them.
|
|
|
|
# Copy all themes because they're not large assets, and bgrt depends on the ImageDir of
|
|
|
|
# the spinner theme.
|
|
|
|
cp -r -L ${themesEnv}/share/plymouth/themes/* themes
|
|
|
|
|
|
|
|
# Patch out any attempted references to the theme or plymouth's themes directory
|
2020-04-24 23:36:52 +00:00
|
|
|
chmod -R +w themes
|
|
|
|
find themes -type f | while read file
|
|
|
|
do
|
2023-07-15 17:15:38 +00:00
|
|
|
sed -i "s,${builtins.storeDir}/.*/share/plymouth/themes,$out/share/plymouth/themes,g" $file
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
# Install themes
|
2020-04-24 23:36:52 +00:00
|
|
|
cp -r themes/* $out/share/plymouth/themes
|
2021-02-22 21:28:39 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
# Install logo
|
|
|
|
mkdir -p $out/etc/plymouth
|
2023-07-15 17:15:38 +00:00
|
|
|
cp -r -L ${themesEnv}/etc/plymouth $out/etc
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
# Setup font
|
2021-02-22 21:28:39 +00:00
|
|
|
mkdir -p $out/share/fonts
|
|
|
|
cp ${cfg.font} $out/share/fonts
|
|
|
|
mkdir -p $out/etc/fonts
|
|
|
|
cat > $out/etc/fonts/fonts.conf <<EOF
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
|
|
|
<fontconfig>
|
|
|
|
<dir>$out/share/fonts</dir>
|
|
|
|
</fontconfig>
|
|
|
|
EOF
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
boot.initrd.extraUtilsCommandsTest = mkIf (!config.boot.initrd.systemd.enable) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
$out/bin/plymouthd --help >/dev/null
|
|
|
|
$out/bin/plymouth --help >/dev/null
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
boot.initrd.extraUdevRulesCommands = mkIf (!config.boot.initrd.systemd.enable) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
cp ${config.systemd.package}/lib/udev/rules.d/{70-uaccess,71-seat}.rules $out
|
|
|
|
sed -i '/loginctl/d' $out/71-seat.rules
|
|
|
|
'';
|
|
|
|
|
|
|
|
# We use `mkAfter` to ensure that LUKS password prompt would be shown earlier than the splash screen.
|
2022-06-16 17:23:12 +00:00
|
|
|
boot.initrd.preLVMCommands = mkIf (!config.boot.initrd.systemd.enable) (mkAfter ''
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p /etc/plymouth
|
2020-07-18 16:06:22 +00:00
|
|
|
mkdir -p /run/plymouth
|
2023-07-15 17:15:38 +00:00
|
|
|
ln -s $extraUtils/etc/plymouth/logo.png /etc/plymouth/logo.png
|
2020-04-24 23:36:52 +00:00
|
|
|
ln -s ${configFile} /etc/plymouth/plymouthd.conf
|
2023-07-15 17:15:38 +00:00
|
|
|
ln -s $extraUtils/share/plymouth/plymouthd.defaults /run/plymouth/plymouthd.defaults
|
|
|
|
ln -s $extraUtils/share/plymouth/themes /run/plymouth/themes
|
|
|
|
ln -s $extraUtils/lib/plymouth /run/plymouth/plugins
|
2021-02-22 21:28:39 +00:00
|
|
|
ln -s $extraUtils/etc/fonts /etc/fonts
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
|
|
|
|
plymouth show-splash
|
2022-05-18 14:49:53 +00:00
|
|
|
'');
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
boot.initrd.postMountCommands = mkIf (!config.boot.initrd.systemd.enable) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
plymouth update-root-fs --new-root-dir="$targetRoot"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# `mkBefore` to ensure that any custom prompts would be visible.
|
2022-06-16 17:23:12 +00:00
|
|
|
boot.initrd.preFailCommands = mkIf (!config.boot.initrd.systemd.enable) (mkBefore ''
|
2020-04-24 23:36:52 +00:00
|
|
|
plymouth quit --wait
|
2022-05-18 14:49:53 +00:00
|
|
|
'');
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|