mirror of
https://github.com/Nexoniarz/nexoniarz-config-nixos.git
synced 2026-11-03 04:24:27 +00:00
- Add qt-theme-set: a working Qt theming pipeline via qt6ct (the QT_QPA_PLATFORMTHEME=qt6ct env var was pointing at a platform theme plugin that wasn't even installed, so every Qt app fell back to its own default style). Also regenerates kdeglobals' KColorScheme groups and sets QT_QUICK_CONTROLS_STYLE=org.kde.desktop for Kirigami-based KDE apps, whose QML-drawn chrome ignores QPalette/qt6ct entirely. Gwenview's dialogs/content now follow the theme; its toolbar/statusbar chrome is a known remaining gap tied to Kirigami's platform-theme detection outside a full Plasma session - Add GTK2 compat (~/.gtkrc-2.0: icon theme + font follow the theme; no dark variant exists for GTK2's Adwaita engine) - Add modules/default-apps.nix: Gwenview/Ark as system-default image viewer/archive manager via /etc/xdg/mimeapps.list, LibreOffice (Qt6 build), and a working Thunar "Open Terminal Here" (it shipped calling exo-open, which isn't installed and never resolved) - Fix display-set.sh: mktemp defaulted to /tmp, a different filesystem than ~/.config/hypr here, making the mv into display.conf a non-atomic copy+unlink. Hyprland's file watcher could catch it mid-replace and throw "source= globbing error: found no match" on any monitor mode/orientation change. Stress-tested with 60 concurrent write+reload cycles after the fix with zero errors
50 lines
2.6 KiB
Nix
50 lines
2.6 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
# Dark GTK theme (built into GTK3/4's Adwaita since 3.20) for Thunar and
|
|
# other GTK apps, as a starting point. The actual palette (accent color,
|
|
# dark/light) is no longer static here — it's generated at runtime by
|
|
# gtk-theme-set (modules/scripts/gtk-theme-set.sh), called from the
|
|
# Quickshell Theme picker (dotfiles/quickshell/Theme.qml) every time the
|
|
# theme changes, so switching accent/mode there actually reaches GTK
|
|
# apps instead of requiring a rebuild.
|
|
environment.systemPackages = with pkgs; [
|
|
gnome-themes-extra
|
|
adwaita-icon-theme
|
|
gruvbox-plus-icons
|
|
dconf
|
|
# Qt's side of the same live-theming pipeline as GTK above — see
|
|
# qt-theme-set (modules/scripts/qt-theme-set.sh). Without this
|
|
# installed, QT_QPA_PLATFORMTHEME=qt6ct (hyprland.conf) pointed at a
|
|
# platform theme plugin that didn't exist, so every Qt app (Gwenview,
|
|
# Ark, Kate, ...) silently fell back to its own default style/palette
|
|
# instead of anything resembling the rest of the desktop.
|
|
qt6Packages.qt6ct
|
|
kdePackages.qqc2-desktop-style # QQC2 style needed for QT_QUICK_CONTROLS_STYLE=
|
|
# org.kde.desktop (hyprland.conf) to actually
|
|
# theme Kirigami-based apps' chrome
|
|
];
|
|
|
|
# No environment.sessionVariables.GTK_THEME here on purpose: GTK_THEME
|
|
# takes priority over settings.ini's gtk-theme-name for GTK3 apps, and
|
|
# as a session env var it's fixed at login — it can't be changed live.
|
|
# A leftover "Adwaita:dark" override here was silently overriding
|
|
# whatever gtk-theme-set wrote to settings.ini, permanently forcing
|
|
# dark mode and blocking the Theme picker from ever reaching Thunar.
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"d /home/nexoniarz/.config/gtk-3.0 0755 nexoniarz users -"
|
|
"d /home/nexoniarz/.config/gtk-4.0 0755 nexoniarz users -"
|
|
"d /home/nexoniarz/.config/qt6ct 0755 nexoniarz users -"
|
|
"d /home/nexoniarz/.config/qt6ct/colors 0755 nexoniarz users -"
|
|
# `f`, not `L+`: created empty only if missing, never overwritten on
|
|
# rebuild — gtk-theme-set/qt-theme-set own the actual content from
|
|
# here on.
|
|
"f /home/nexoniarz/.config/gtk-3.0/gtk.css 0644 nexoniarz users - -"
|
|
"f /home/nexoniarz/.config/gtk-4.0/gtk.css 0644 nexoniarz users - -"
|
|
"f /home/nexoniarz/.config/gtk-3.0/settings.ini 0644 nexoniarz users - -"
|
|
"f /home/nexoniarz/.config/gtk-4.0/settings.ini 0644 nexoniarz users - -"
|
|
"f /home/nexoniarz/.gtkrc-2.0 0644 nexoniarz users - -"
|
|
"f /home/nexoniarz/.config/qt6ct/qt6ct.conf 0644 nexoniarz users - -"
|
|
];
|
|
}
|