Merge pull request #212 from h4m6urg1r/master

flake.nix simplified splashImage changing
This commit is contained in:
Vince 2024-02-17 20:46:01 +08:00 committed by GitHub
commit 82c47cfa55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 5 deletions

View File

@ -39,12 +39,8 @@
--icon ${cfg.icon};
if [ -n "${splashImage}" ]; then
filename=$(basename -- "${splashImage}")
extension="''${filename##*.}"
rm $out/grub/themes/${cfg.theme}/background.jpg;
cp ${splashImage} $out/grub/themes/${cfg.theme}/background.$extension;
cp ${splashImage} $out/grub/themes/${cfg.theme}/background;
sed -i "s/background.jpg/background.$extension/g" $out/grub/themes/${cfg.theme}/theme.txt;
${pkgs.imagemagick}/bin/convert ${splashImage} $out/grub/themes/${cfg.theme}/background.jpg;
fi;
if [ ${pkgs.lib.trivial.boolToString cfg.footer} == "false" ]; then
sed -i ':again;$!N;$!b again; s/\+ image {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;