summary refs log tree commit diff
path: root/nixos/modules/config
diff options
context:
space:
mode:
authorBenjamin Staffin <benley@gmail.com>2017-11-10 16:55:43 -0500
committerBenjamin Staffin <benley@gmail.com>2017-11-10 16:57:45 -0500
commit64a9f5f0eb7a505f3f38e613290a0ee97a37cf04 (patch)
tree00e95ab6302cea5ea8a4f4b139303ef30b6f38b8 /nixos/modules/config
parent24e87b49b69eeceb35698c31fc78aa6c37c3a53f (diff)
downloadnixlib-64a9f5f0eb7a505f3f38e613290a0ee97a37cf04.tar
nixlib-64a9f5f0eb7a505f3f38e613290a0ee97a37cf04.tar.gz
nixlib-64a9f5f0eb7a505f3f38e613290a0ee97a37cf04.tar.bz2
nixlib-64a9f5f0eb7a505f3f38e613290a0ee97a37cf04.tar.lz
nixlib-64a9f5f0eb7a505f3f38e613290a0ee97a37cf04.tar.xz
nixlib-64a9f5f0eb7a505f3f38e613290a0ee97a37cf04.tar.zst
nixlib-64a9f5f0eb7a505f3f38e613290a0ee97a37cf04.zip
fonts: fix fontconfig.localConf when used with penultimate
Fixes #31500
Diffstat (limited to 'nixos/modules/config')
-rw-r--r--nixos/modules/config/fonts/fontconfig-penultimate.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/config/fonts/fontconfig-penultimate.nix b/nixos/modules/config/fonts/fontconfig-penultimate.nix
index 3e163b8ec51e..fc01c15acb9b 100644
--- a/nixos/modules/config/fonts/fontconfig-penultimate.nix
+++ b/nixos/modules/config/fonts/fontconfig-penultimate.nix
@@ -52,6 +52,8 @@ let
       </fontconfig>
     '';
 
+  localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
+
   # The configuration to be included in /etc/font/
   penultimateConf = pkgs.runCommand "font-penultimate-conf" {} ''
     support_folder=$out/etc/fonts/conf.d
@@ -107,6 +109,12 @@ let
       $latest_folder/51-local.conf \
       --replace local.conf /etc/fonts/${latestVersion}/local.conf
 
+    # local.conf (indirect priority 51)
+    ${optionalString (cfg.localConf != "") ''
+    ln -s ${localConf}        $out/etc/fonts/local.conf
+    ln -s ${localConf}        $out/etc/fonts/${latestVersion}/local.conf
+    ''}
+
     ln -s ${defaultFontsConf} $support_folder/52-default-fonts.conf
     ln -s ${defaultFontsConf} $latest_folder/52-default-fonts.conf