Skip to content

Commit

Permalink
nixos/plymouth: exit on missing theme
Browse files Browse the repository at this point in the history
Much better to provide a helpful message than to
get an obscure sed message.
  • Loading branch information
worldofpeace committed Feb 25, 2021
1 parent dd88056 commit 726dd98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nixos/modules/system/boot/plymouth.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 726dd98

Please sign in to comment.