nixos/boot.plymouth.font: escape font path

This fixes the usage of fonts whose filenames contain special
characters of various sorts.

For example, the setting
```nix
boot.plymouth.font =
  "${pkgs.noto-fonts}/share/fonts/noto/NotoSans[wdth,wght].ttf";
```

will cause a build failure, without this patch.
This commit is contained in:
Kylie McClain 2024-04-23 17:54:20 -04:00
parent f1010e0469
commit 4f96031495
No known key found for this signature in database

View File

@ -219,7 +219,7 @@ in
# Fonts
"/etc/plymouth/fonts".source = pkgs.runCommand "plymouth-initrd-fonts" {} ''
mkdir -p $out
cp ${cfg.font} $out
cp ${escapeShellArg cfg.font} $out
'';
"/etc/fonts/fonts.conf".text = ''
<?xml version="1.0"?>