Trouble setting GTK and Qt themes with HM options

What happens? Nothing. Default themes.

Below are the options that I was able to find to set the GTK and Qt themes. For Qt, I want to use Kvantum because Materia looks perfectly consistent with GTK when I do.

The name strings are correct, I looked inside the packages.

I was told that home.sessionVariables is often not respected. Do I need to inject them into my shell, and have that managed with HM? If the issue is with GDM, how do I force it to use my environment? Do I have to make my window manager run a shell script on startup?

At the very least I would expect Thunar to be themed properly with the gtk attribute. But it is still white.

What about Qt icons? I see no option to set those, and I don’t know of an environment variable for it.

Excerpt of profile.nix:

  home.packages = with pkgs; [

  gtk.iconTheme.package = pkgs.papirus-icon-theme; = "Papirus-Dark";

  gtk.theme.package = pkgs.materia-theme; = "Materia-dark-compact";

  xdg.configFile."Kvantum/kvantum.kvconfig".text = ''

  home.sessionVariables = {
    QT_STYLE_OVERRIDE = "kvantum";

Firstly, these are home-manager options, not nixos options. Might want to alter that title if you can…

Second, generally, home-manager doesn’t interfere with anything until you tell it to, and most options require that you’ve set home-manager to control the files necessary to implement them.

For example, have you set gtk.enable = true;?

1 Like

Thank you, that did it. And my bad on the title. Now to figure out Qt.