Files
nix-config/home/linux/gui/base/desktop-tools.nix
T
ryan4yin | 二花 0ec5b8032c fix(desktop): align Qt app fonts with GTK (#386)
* fix(desktop): align Qt app fonts with GTK

Qt apps kept their built-in default font ("Sans Serif" 9) while GTK apps use
`gtk-font-name` (Noto Sans 11), so Telegram and other Qt apps rendered
noticeably smaller than GTK apps like Firefox. Set
QT_QPA_PLATFORMTHEME=gtk3; the plugin ships with qtbase, so it needs no
extra package and also gives Qt apps GTK file dialogs.

* chore(desktop): drop unused Xft.dpi from the Wayland GTK profile

Xft.dpi/ *.dpi are X11 X-resource settings. This file is only imported by
the niri (Wayland) hosts, where xwayland-satellite sets its own Xft.dpi
(96 x output scale, currently 144), and the i3 hosts are headless 1080p
computer-use sessions that do not import it. So the setting had no effect
anywhere; remove it instead of keeping a misleading knob.
2026-10-05 20:01:51 +08:00

43 lines
1.4 KiB
Nix

{ mylib, pkgs, ... }:
{
# wayland related
home.sessionVariables = {
"NIXOS_OZONE_WL" = "1"; # for any ozone-based browser & electron apps to run on wayland
"MOZ_ENABLE_WAYLAND" = "1"; # for firefox to run on wayland
"MOZ_WEBRENDER" = "1";
# enable native Wayland support for most Electron apps
"ELECTRON_OZONE_PLATFORM_HINT" = "auto";
# Make Qt apps follow the GTK font and theme. Without this, Qt keeps its
# built-in default ("Sans Serif" 9) while GTK uses `gtk-font-name`
# (Noto Sans 11), so Qt apps like Telegram render visibly smaller than
# GTK apps. The `gtk3` platform theme plugin ships with qtbase, so no
# extra package is needed, and it also gets GTK file dialogs.
"QT_QPA_PLATFORMTHEME" = "gtk3";
# misc
"_JAVA_AWT_WM_NONREPARENTING" = "1";
"QT_WAYLAND_DISABLE_WINDOWDECORATION" = "1";
"SDL_VIDEODRIVER" = "wayland";
"GDK_BACKEND" = "wayland";
"XDG_SESSION_TYPE" = "wayland";
};
home.packages = with pkgs; [
wl-clipboard # copying and pasting
brightnessctl
# screen recording
wf-recorder # screen recording
virt-manager # manage the libvirt VMs
virt-viewer # vnc/spice console for the libvirt VMs
];
# Emergency session-menu fallback; the normal flow uses Noctalia's session panel.
programs.wlogout.enable = true;
# auto mount usb drives
services = {
udiskie.enable = true;
# syncthing.enable = true;
};
}