# Struggling to configure GTk/QT theme on laptop

**URL:** https://discourse.nixos.org/t/struggling-to-configure-gtk-qt-theme-on-laptop/42268
**Category:** Help
**Created:** [March 27, 2024, 12:57pm UTC](https://discourse.nixos.org/t/struggling-to-configure-gtk-qt-theme-on-laptop/42268 "2024-03-27T12:57:42Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![heitorpb](https://discourse.nixos.org/user_avatar/discourse.nixos.org/heitorpb/32/16704_2.png) [@heitorpb](https://discourse.nixos.org/u/heitorpb)
#### Post date: [April 1, 2024, 12:23pm UTC](https://discourse.nixos.org/t/struggling-to-configure-gtk-qt-theme-on-laptop/42268/10 "2024-04-01T12:23:10Z")

</div>

AHA!

Got it working! I manually wrote the configuration files for `qt5ct` and `qt6ct` this way:

```nix
  xdg.configFile = lib.mkIf hasSeat {
    kvantum = {
      target = "Kvantum/kvantum.kvconfig";
      text = lib.generators.toINI { } {
        General.theme = "Catppuccin-Mocha-Blue";
      };
    };

    qt5ct = {
      target = "qt5ct/qt5ct.conf";
      text = lib.generators.toINI { } {
        Appearance = {
          icon_theme = "Papirus-Dark";
        };
      };
    };

    qt6ct = {
      target = "qt6ct/qt6ct.conf";
      text = lib.generators.toINI { } {
        Appearance = {
          icon_theme = "Papirus-Dark";
        };
      };
    };

```

My `hasSeat` is a boolean that only writes this file if I have a systemd-seat (graphical interface), I use the same configuration files for my headless server. I need this because I use impermanence ([Erase your darlings: immutable infrastructure for mutable systems - Graham Christensen](https://grahamc.com/blog/erase-your-darlings/)). Also, I don’t want to have to manually setup my icons in the other laptop.

My complete configuration file is now this: [wm-theme](https://github.com/heitorPB/dotfiles-supimpas/blob/9deab8c297d8a681e975cf48941ffed7d4e9194b/home-manager/wm-theme.nix) with these extra packages system-wide:

```nix
    libsForQt5.qtstyleplugin-kvantum.
    libsForQt5.qt5ct # Magic for some Qt apps keep functionality.

```

But it seems those two could be moved to my user.

Thank you @eljamm @anon54679641!

---

_[View the full topic](https://discourse.nixos.org/t/struggling-to-configure-gtk-qt-theme-on-laptop/42268)._
