Hi,
I can’t use the fonts I install in X apps.
Here is some context:
$ grep /fonts /var/log/X.0.log
/nix/store/rifrcwvvik8dp5kwlg7fd5aasf8sn030-font-bh-lucidatypewriter-100dpi-1.0.3/lib/X11/fonts/100dpi,
/nix/store/hdi9qg6nyamj97j6z9n87cnksz2x89km-font-bh-lucidatypewriter-75dpi-1.0.3/lib/X11/fonts/75dpi,
/nix/store/hgy3dg9cr6w7cbgmp0f82xrbdwwqnz53-font-bh-100dpi-1.0.3/lib/X11/fonts/100dpi,
/nix/store/iqz617a3295s5fl4qknb2af1r3zh9dis-font-misc-misc-1.1.2/lib/X11/fonts/misc,
/nix/store/bm3dk5qjhqny28czd29bzjwc5gzzfbm3-font-cursor-misc-1.0.3/lib/X11/fonts/misc,
/nix/store/bclvc9l2ccq037gyzxyc096zp8h689pv-unifont-13.0.01/share/fonts,
/nix/store/ap1db9gm81vcxp66l5zrw3lv240c9wgg-font-adobe-100dpi-1.0.3/lib/X11/fonts/100dpi,
/nix/store/41yjjcf2dinzk1dihm0dkxnmchyksgk5-font-adobe-75dpi-1.0.3/lib/X11/fonts/75dpi
I suspect there should be a reference to /run/current-system/sw/share/X11-fonts somehow as it has it all with the fonts.dir nicely up-to-date.
Here is the relevant part of my configuration.nix:
fonts = {
fonts = with pkgs; [
source-sans-pro
source-serif-pro
(nerdfonts.override { fonts = [ "Iosevka" "FiraCode" "Inconsolata" "JetBrainsMono" "Hasklig" "Meslo" ]; })
];
fontconfig = {
defaultFonts = {
monospace = [ "Iosevka" ];
sansSerif = [ "FiraGO" "Source Sans Pro" ];
serif = [ "ETBembo" "Source Serif Pro" ];
};
};
enableFontDir = true;
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# ... misc stuff ...
system.stateVersion = "20.09";
Here is fontconfig having Iosevka in sight (example):
$ fc-list --format="%{family}\n" | grep Iosevka | wc -l
84
Here is X not seeing it:
$ xlsfonts | grep -i Iosevka | wc -l
0
In fact, X sees nothing but “legacy” fonts: adobe, lucida, fixed.
Thanks for your help!