Skip to content

Commit

Permalink
grub: use fc-match format option rather than grep
Browse files Browse the repository at this point in the history
  • Loading branch information
danth authored May 16, 2024
1 parent b5f4ca4 commit 68b5c2b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions modules/grub/nixos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ let
pkgs.makeFontsConf { fontDirectories = [ font.package ]; };
} ''
# Use fontconfig to select the correct .ttf or .otf file based on name
font=$(
${pkgs.fontconfig}/bin/fc-match -v "${font.name}" \
| grep "file:" | cut -d '"' -f 2
)
font=$(${lib.getExe' pkgs.fontconfig "fc-match"} --format=%{file})
# Convert to .pf2
${pkgs.grub2}/bin/grub-mkfont $font --output $out --size ${toString sizes.applications}
Expand Down

0 comments on commit 68b5c2b

Please sign in to comment.