From 4f96031495903a6762ea0463f31551351b107a67 Mon Sep 17 00:00:00 2001 From: Kylie McClain Date: Tue, 23 Apr 2024 17:54:20 -0400 Subject: [PATCH] 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. --- nixos/modules/system/boot/plymouth.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index 4fed6335f742..68c3286b22a0 100644 --- a/nixos/modules/system/boot/plymouth.nix +++ b/nixos/modules/system/boot/plymouth.nix @@ -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 = ''