summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2022-08-11 08:38:33 +0100
committerGitHub <noreply@github.com>2022-08-11 08:38:33 +0100
commit5a436f538f8cac19fd306e865d2e7f19d21d1d19 (patch)
treec6753cd2491670ea84cd4a548ddf92bd2a65546e /nixos
parent370e7d9be92ac8965af39fa439edb345101b96b6 (diff)
parent348b88545c26245701d3f8b5ff33ac19310a7c46 (diff)
Merge pull request #179619 from Informatic/plymouth-systemd-stage1-themes
nixos/plymouth: fix theme dependency resolution in systemd stage 1
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/plymouth.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix
index 366d6ee432868..02d8fcf4799cb 100644
--- a/nixos/modules/system/boot/plymouth.nix
+++ b/nixos/modules/system/boot/plymouth.nix
@@ -184,9 +184,14 @@ in
           mkdir $out
           cp -r ${themesEnv}/share/plymouth/themes/${cfg.theme} $out
           # Copy more themes if the theme depends on others
-          for theme in $(grep -hRo '/etc/plymouth/themes/.*$' ${themesEnv} | xargs -n1 basename); do
-              if [[ -d "${themesEnv}/theme" ]]; then
-                  cp -r "${themesEnv}/theme" $out
+          for theme in $(grep -hRo '/etc/plymouth/themes/.*$' $out | xargs -n1 basename); do
+              if [[ -d "${themesEnv}/share/plymouth/themes/$theme" ]]; then
+                  if [[ ! -d "$out/$theme" ]]; then
+                    echo "Adding dependent theme: $theme"
+                    cp -r "${themesEnv}/share/plymouth/themes/$theme" $out
+                  fi
+              else
+                echo "Missing theme dependency: $theme"
               fi
           done
         '';