git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #31504 from benley/fontconfig-localconf

fonts: fix fontconfig.localConf when used with penultimate

commitdd5e6bcefcfa522590187b7306857acce236f508 authorThomas Tuegel <ttuegel@secure.mailbox.org> dateWed 15 Nov 2017, 08:23 (9 years ago) parentc702b1c64a9f5f
1 file changed+8
nixos/modules/config/fonts/fontconfig-penultimate.nix+8
nixos/modules/config/fonts/fontconfig-penultimate.nix+8
@@ -52,6 +52,8 @@ let
5252 </fontconfig>
5353 '';
5454
55+ localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
56+
5557 # The configuration to be included in /etc/font/
5658 penultimateConf = pkgs.runCommand "font-penultimate-conf" {} ''
5759 support_folder=$out/etc/fonts/conf.d
@@ -107,6 +109,12 @@ let
107109 $latest_folder/51-local.conf \
108110 --replace local.conf /etc/fonts/${latestVersion}/local.conf
109111
112+ # local.conf (indirect priority 51)
113+ ${optionalString (cfg.localConf != "") ''
114+ ln -s ${localConf} $out/etc/fonts/local.conf
115+ ln -s ${localConf} $out/etc/fonts/${latestVersion}/local.conf
116+ ''}
117+
110118 ln -s ${defaultFontsConf} $support_folder/52-default-fonts.conf
111119 ln -s ${defaultFontsConf} $latest_folder/52-default-fonts.conf
112120