mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
nixos/fontdir: add option to decompress fonts
This will let Xwayland use the global font folder as font path
This commit is contained in:
parent
c99bd9bedf
commit
f41f53dc49
@ -10,6 +10,9 @@ let
|
||||
find ${toString config.fonts.fonts} -regex "$font_regexp" \
|
||||
-exec ln -sf -t "$out/share/X11/fonts" '{}' \;
|
||||
cd "$out/share/X11/fonts"
|
||||
${optionalString config.fonts.fontDir.decompressFonts ''
|
||||
${pkgs.gzip}/bin/gunzip -f *.gz
|
||||
''}
|
||||
${pkgs.xorg.mkfontscale}/bin/mkfontscale
|
||||
${pkgs.xorg.mkfontdir}/bin/mkfontdir
|
||||
cat $(find ${pkgs.xorg.fontalias}/ -name fonts.alias) >fonts.alias
|
||||
@ -31,6 +34,14 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
decompressFonts = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to decompress fonts in
|
||||
<filename>/run/current-system/sw/share/X11/fonts</filename>.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user