summary refs log tree commit diff
path: root/nixos/modules/config/fonts/fontconfig.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-08-17 23:12:57 +0200
committerFlorian Klink <flokli@flokli.de>2020-08-17 23:12:57 +0200
commit8425726f86a2f4a38d0022f3d5cb1d2001da6999 (patch)
treecf96cdac767b89c69f03cd562a3b95d58d7fc09f /nixos/modules/config/fonts/fontconfig.nix
parentfd2c6cd7ea7f66e4cd8679dc2f296a344606ecf1 (diff)
downloadnixpkgs-8425726f86a2f4a38d0022f3d5cb1d2001da6999.tar
nixpkgs-8425726f86a2f4a38d0022f3d5cb1d2001da6999.tar.gz
nixpkgs-8425726f86a2f4a38d0022f3d5cb1d2001da6999.tar.bz2
nixpkgs-8425726f86a2f4a38d0022f3d5cb1d2001da6999.tar.lz
nixpkgs-8425726f86a2f4a38d0022f3d5cb1d2001da6999.tar.xz
nixpkgs-8425726f86a2f4a38d0022f3d5cb1d2001da6999.tar.zst
nixpkgs-8425726f86a2f4a38d0022f3d5cb1d2001da6999.zip
nixos/fontconfig: fix 50-user.conf handling
Apparently, edf2541f02c6b24ea791710d5cadeae36f9b1a3a was missed while
rebasing https://github.com/NixOS/nixpkgs/pull/93562.

Provide 50-user.conf in fontconfig if includeUserConf is true (the
default), and don't try removing the non-existent one if it's disabled

Fixes https://github.com/NixOS/nixpkgs/issues/95685
Fixes https://github.com/NixOS/nixpkgs/issues/95712
Diffstat (limited to 'nixos/modules/config/fonts/fontconfig.nix')
-rw-r--r--nixos/modules/config/fonts/fontconfig.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix
index 84643019471..2c6a2182876 100644
--- a/nixos/modules/config/fonts/fontconfig.nix
+++ b/nixos/modules/config/fonts/fontconfig.nix
@@ -204,8 +204,10 @@ let
     ln -s ${renderConf}       $dst/10-nixos-rendering.conf
 
     # 50-user.conf
-    ${optionalString (!cfg.includeUserConf) ''
-    rm $dst/50-user.conf
+    # Since latest fontconfig looks for default files inside the package,
+    # we had to move this one elsewhere to be able to exclude it here.
+    ${optionalString cfg.includeUserConf ''
+    ln -s ${pkg.out}/etc/fonts/conf.d.bak/50-user.conf $dst/50-user.conf
     ''}
 
     # local.conf (indirect priority 51)