diff options
author | Piotr Dobrowolski <admin@tastycode.pl> | 2022-06-29 21:37:46 +0200 |
---|---|---|
committer | Piotr Dobrowolski <admin@tastycode.pl> | 2022-06-29 21:38:34 +0200 |
commit | 348b88545c26245701d3f8b5ff33ac19310a7c46 (patch) | |
tree | 997406aa7adca1e86e6f6e07c943abf66ae7017f /nixos/modules | |
parent | 15e41e3edfaa82c4a3aa2d1527fd142d59bdba7f (diff) | |
download | nixpkgs-348b88545c26245701d3f8b5ff33ac19310a7c46.tar nixpkgs-348b88545c26245701d3f8b5ff33ac19310a7c46.tar.gz nixpkgs-348b88545c26245701d3f8b5ff33ac19310a7c46.tar.bz2 nixpkgs-348b88545c26245701d3f8b5ff33ac19310a7c46.tar.lz nixpkgs-348b88545c26245701d3f8b5ff33ac19310a7c46.tar.xz nixpkgs-348b88545c26245701d3f8b5ff33ac19310a7c46.tar.zst nixpkgs-348b88545c26245701d3f8b5ff33ac19310a7c46.zip |
nixos/plymouth: fix theme dependency resolution in systemd stage 1
Some plymouth themes use assets of others, like is the case with our default bgrt depending on spinner. Missing assets would cause the splashscreen to not render at all in stage 1. Preliminary dependency resolution code seemed to be broken, and this should fix it. Only direct dependencies of selected theme are pulled in.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/system/boot/plymouth.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index 59037d4e6b4..132b073112f 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 ''; |