From d5c82f72131ac1661cc9282abdecb0885ab7906c Mon Sep 17 00:00:00 2001 From: Hamburgir Date: Fri, 16 Feb 2024 17:55:23 +0530 Subject: [PATCH] flake.nix simplified splashImage changing Fixed problem that occured when setting custom spalsh image for NixOS --- flake.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index f2289e7..12b555b 100644 --- a/flake.nix +++ b/flake.nix @@ -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;