summary refs log tree commit diff
path: root/nixos/modules/config/fonts/fontconfig.nix
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-08-24 13:42:11 +0100
committerGitHub <noreply@github.com>2020-08-24 13:42:11 +0100
commit4c9ad3ca793e2418a725f2c227108b71db109913 (patch)
tree3dfb818a33da2cf65515970586a1723cb8792cb3 /nixos/modules/config/fonts/fontconfig.nix
parent5c70c5eeaa275aae90e1d3e5b63a6fdcf29bc850 (diff)
parente207de63f4f4a8f377eed1f522dc872f338eb26c (diff)
downloadnixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.gz
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.bz2
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.lz
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.xz
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.zst
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.zip
Merge branch 'master' into nginx-update
Diffstat (limited to 'nixos/modules/config/fonts/fontconfig.nix')
-rw-r--r--nixos/modules/config/fonts/fontconfig.nix15
1 files changed, 5 insertions, 10 deletions
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix
index 84643019471..1f1044bc5af 100644
--- a/nixos/modules/config/fonts/fontconfig.nix
+++ b/nixos/modules/config/fonts/fontconfig.nix
@@ -190,13 +190,6 @@ let
     ln -s ${pkg.out}/etc/fonts/conf.d/*.conf \
           $dst/
 
-    # update 51-local.conf path to look at local.conf
-    rm  $dst/51-local.conf
-
-    substitute ${pkg.out}/etc/fonts/conf.d/51-local.conf \
-               $dst/51-local.conf \
-               --replace local.conf /etc/fonts/${pkg.configVersion}/local.conf
-
     # 00-nixos-cache.conf
     ln -s ${cacheConf}  $dst/00-nixos-cache.conf
 
@@ -204,8 +197,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)
@@ -455,7 +450,7 @@ in
       environment.systemPackages    = [ pkgs.fontconfig ];
       environment.etc.fonts.source  = "${fontconfigEtc}/etc/fonts/";
     })
-    (mkIf (cfg.enable && !cfg.penultimate.enable) {
+    (mkIf cfg.enable {
       fonts.fontconfig.confPackages = [ confPkg ];
     })
   ];