Route fontconfig through fonts.fontconfig.localConf

/etc/fonts/conf.d is owned by the NixOS fontconfig module and rejects
environment.etc entries. Same content as
defaults/etc/fonts/conf.d/65-moonarch-fonts.conf.
This commit is contained in:
2026-08-07 12:33:43 +02:00
parent baae084594
commit acb7301e97
2 changed files with 40 additions and 3 deletions
Generated
+17
View File
@@ -1,5 +1,21 @@
{
"nodes": {
"moonarch": {
"flake": false,
"locked": {
"lastModified": 1785748010,
"narHash": "sha256-yIxoYOME+oqEBnPRF14zVBGvmQRrgG1474q6D93KliQ=",
"ref": "refs/heads/main",
"rev": "a95b524d79cb5dc3c4e4906cc479c73a3934e590",
"revCount": 159,
"type": "git",
"url": "https://gitea.moonarch.de/nevaforget/moonarch.git"
},
"original": {
"type": "git",
"url": "https://gitea.moonarch.de/nevaforget/moonarch.git"
}
},
"moongreet": {
"flake": false,
"locked": {
@@ -69,6 +85,7 @@
},
"root": {
"inputs": {
"moonarch": "moonarch",
"moongreet": "moongreet",
"moonlock": "moonlock",
"moonset": "moonset",
+23 -3
View File
@@ -52,12 +52,32 @@ in
# Configs outside /etc/xdg/ in the Arch package as well.
"mpv/mpv.conf".source = "${etc}/mpv/mpv.conf";
"fonts/conf.d/65-moonarch-fonts.conf".source =
"${etc}/fonts/conf.d/65-moonarch-fonts.conf";
"xdg-desktop-portal/niri-portals.conf".source =
"${etc}/xdg-desktop-portal/niri-portals.conf";
};
# Generic-family defaults. Same content as
# defaults/etc/fonts/conf.d/65-moonarch-fonts.conf, but routed through the
# fontconfig module: /etc/fonts/conf.d/ is owned by NixOS and rejects
# environment.etc entries.
fonts.fontconfig.localConf = ''
<description>Moonarch generic-family defaults</description>
<!-- binding="strong" required: the default weak <prefer> ranks behind
stock generic fallbacks, so it would not take effect. -->
<alias binding="strong">
<family>sans-serif</family>
<prefer>
<family>UbuntuSans Nerd Font</family>
</prefer>
</alias>
<alias binding="strong">
<family>monospace</family>
<prefer>
<family>UbuntuSansMono Nerd Font</family>
</prefer>
</alias>
'';
# --- Compositor ---
programs.niri.enable = true;
@@ -137,7 +157,7 @@ in
colloid-icon-theme
libsForQt5.qtstyleplugin-kvantum
qt6Packages.qtstyleplugin-kvantum
qt6ct
qt6Packages.qt6ct
qt6.qt5compat
# CLI tools referenced by zshrc and the helper scripts