From 06b2792f1f0c282046996052946cb16024363d26 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 23:58:06 -0500 Subject: [PATCH] Ensure GTK theme applies to QT apps too --- themes/default.nix | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/themes/default.nix b/themes/default.nix index 15cbe0eb..5c00a64f 100644 --- a/themes/default.nix +++ b/themes/default.nix @@ -1,18 +1,17 @@ { config, lib, pkgs, ... }: { - environment = { - systemPackages = with pkgs; [ - libsForQt5.qtstyleplugins - # qt5.qtbase # make Qt 5 apps inherit GTK2 theme - ]; - - sessionVariables = { - QT_QPA_PLATFORMTHEME = "gtk2"; - GTK_DATA_PREFIX = [ "${config.system.path}" ]; - GTK2_RC_FILES = "$HOME/.config/gtk-2.0/gtkrc"; - }; + environment.variables = { + GTK_DATA_PREFIX = [ "${config.system.path}" ]; + GTK2_RC_FILES = "$HOME/.config/gtk-2.0/gtkrc"; + QT_QPA_PLATFORMTHEME = "gtk2"; }; + + qt5 = { + style = "gtk2"; + platformTheme = "gtk2"; + }; + services.xserver.displayManager.sessionCommands = '' source "$XDG_CONFIG_HOME"/xsession/*.sh xrdb -merge "$XDG_CONFIG_HOME"/xtheme/*