nixos/plymouth: exit on missing theme

Much better to provide a helpful message than to
get an obscure sed message.
wip/yesman
WORLDofPEACE 3 years ago
parent dd8805658e
commit 726dd9804e
  1. 6
      nixos/modules/system/boot/plymouth.nix

@ -118,6 +118,12 @@ in
copy_bin_and_libs ${pkgs.plymouth}/bin/plymouthd
copy_bin_and_libs ${pkgs.plymouth}/bin/plymouth
# 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/lib/plymouth/renderers

Loading…
Cancel
Save