As far as I can tell, any qt5 app (ksnip and qsstv in particular are problems for me) will ignore any default font setting, set using qt5ct, qt6ct, or fonts.fontconfig.defaultFonts
, and use the first installed font alphabetically, unless all of plasma6 is enabled. In this case that’s Air America which I installed by putting the otf in ~/.local/share/fonts
and running fc-cache
.
This only happens with qt5 apps.
I’m assuming it has something to do with plasma installing qt components I don’t otherwise have installed.
qt5 and qt6 apps also don’t properly fit gtk theming without plasma installed, so I imagine that’s a similar issue, but I can usually live with that
Relevant sections of config:
configuration.nix
{ config, pkgs, lib, inputs, ... }: {
imports = [
./hardware-configuration.nix
../../features/nvidia.nix
../../features/sound.nix
../../features/gnome.nix
#../../features/plasma6.nix
];
...
fonts = {
packages = with pkgs; [
iosevka-comfy.comfy
atkinson-hyperlegible
departure-mono
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
];
fontconfig = {
enable = true;
defaultFonts = {
serif = [ "Liberation Serif" ];
sansSerif = [ "Atkinson Hyperlegible" ];
monospace = [ "Departure Mono" ];
};
};
};
};
features/plasma6.nix
{ lib, pkgs, ... }: {
#services.xserver.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
programs.ssh.askPassword = lib.mkForce "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
}
home.nix
{ inputs, config, pkgs, lib, ... }: {
qt = {
enable = true;
platformTheme.name = "gtk2";
#style.name = "adwaita-dark";
# this only half works, results in unreadable half dark half light qt6 apps
};
gtk = {
enable = true;
#theme.name = "adwaita-dark";
#gtk2.extraConfig = ''
# gtk-color-scheme prefer-dark
#'';
#gtk3.extraConfig.gtk-color-scheme = "prefer-dark";
#gtk4.extraConfig.gtk-color-scheme = "prefer-dark";
# these do nothing afaict
iconTheme.name = "Adwaita";
};
home.packages = with pkgs; [
...
qsstv
ksnip
];
};