I’m trying to configure my default fonts for my system (for readability), but I can’t quite seem to get the syntax correct that causes the configuration file to compile. I went with the ubuntu font for the sake of a basic test.
This is as far as I got configuration wise based off of research:
I suspect I’m misunderstanding how to reference fonts correctly? But I can’t find any more information online about this, even looking off of the github repo for Nerd Fonts (which seems to be a decent compilation of fonts)
I’m a total newbie at this operating system, so any further information about font configuration (or directions to where I can find that info) would be appreciated!
Ah, I understand! So the with keyword prefixes all the members in there with a namespace. I’ll keep the keyword there since it’s a bit easier for me to read and better to reference off of in the future.
I amended how I defined the default fonts too. I also made sure to explicitly add the sans and mono variations to my packages too, since I missed that before.
Hello, this font itch stumbled into me, too.
I followed the wiki, setting fonts.fontconfig.enable & fonts.fontconfig.defaultFonts.* on both NixOS and home-manager level, but they don’t seem to do anything?
For GTK programs, Hyprland on NixOS – Hyprland Wiki (I don’t use Hyprland but it’s relevant) suggests using dconf, I then adapted into home-manager level:
dconf.settings."org/gnome/desktop/interface"."font-name" = "Adwaita Sans 10.8";
dconf.settings."org/gnome/desktop/interface"."monospace-font-name" = "Fira Code 10.8";
If missing something originally and/or resorting to this isn’t actually needed, I am happy to use another way.
Perhaps because I forgot to set gtk.font.size, now setting it does affect "org/gnome/desktop/interface"."font-name" indeed. But "org/gnome/desktop/interface"."monospace-font-name" still happens to need dconf.