# Guide to installing qt theme

**URL:** https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523
**Category:** Guides
**Created:** [November 15, 2023, 11:08pm UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523 "2023-11-15T23:08:53Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![anon77591810](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/a/b5e925/32.png) [@anon77591810](https://discourse.nixos.org/u/anon77591810)
#### Post date: [November 15, 2023, 11:08pm UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/1 "2023-11-15T23:08:53Z")

</div>

Hello everyone, I can’t get the QT5 theme to work on Wayland. I’ve tried all the methods from the NixOS options, but they’re not working; the session variable just won’t apply.

I tried the following:

`qt = {  
enable = true;  
style = {  
package = utterly-nord-plasma;  
name = “Utterly Nord Solid”;  
};  
platformTheme = “qt5ct”; // I tried all other variants too.  
};

environment.sessionVariables or environment.variables = {  
QT\_QPA\_PLATFORM = “wayland”; // I tried all other variants too.  
QT\_QPA\_PLATFORMTHEME = “qt5ct”; // I tried all other variants too.  
};

environment.variables = {  
“QT\_STYLE\_OVERRIDE” = “kvantum”; // I tried all other variants too.  
QT\_QPA\_PLATFORMTHEME = “qt5ct”; // I tried all other variants too.  
};

environment.variables = lib.mkForce {  
QT\_STYLE\_OVERRIDE = “{mytheme}”;  
};`

Additionally, if I export the variables directly in the terminal, it works. However, I can’t figure out how to make Hyprland’s share-picker use my theme, if I solve the problem, because it’s not working.

Thanks.

---

<div class="post-metadata">

### Author: ![anon77591810](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/a/b5e925/32.png) [@anon77591810](https://discourse.nixos.org/u/anon77591810)
#### Post date: [November 21, 2023, 12:27am UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/2 "2023-11-21T00:27:55Z")

</div>

Hey fellow Nix enthusiasts! 🌟

If you are venturing into the beautiful world of Nix and want to spruce up your **Qt** applications with a theme, here is a simple guide to get you started:

🔧 System Configuration 🔧

```auto
environment.systemPackages = with pkgs;
  [
    libsForQt5.qtstyleplugin-kvantum
    libsForQt5.qt5ct
];
nixpkgs.config.qt5 = {
  enable = true;
  platformTheme = "qt5ct"; 
    style = {
      package = pkgs.utterly-nord-plasma;
      name = "Utterly Nord Plasma";
    };
};

```

`environment.variables.QT_QPA_PLATFORMTHEME = "qt5ct";`

This snippet ensures your system knows about the **qt6ct or qt5ct or Kvantum** platform theme and **qt6ct or qt5ct or Kvantum** , a tool to apply stunning themes to **Qt** applications.

🏠 Home Manager Configuration 🏠

In your home.nix, you might want to **fetch** a fresh theme from the **unstable channel** and **get access to theme directly** :

```auto
  home-manager.users.varmisa = { pkgs, ... }: let
    unstablePkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {
      config = config.nixpkgs.config;
    };
  in {
    home.packages = with pkgs; [unstablePkgs.utterly-nord-plasma];
    xdg.configFile = {
      "Kvantum/Utterly-Nord-Solid-Plasma/Utterly-Nord-Solid/Utterly-Nord-Solid.kvconfig".source = "${unstablePkgs.utterly-nord-plasma}/share/Kvantum/Utterly-Nord-Solid/Utterly-Nord-Solid.kvconfig";
      "Kvantum/Utterly-Nord-Solid-Plasma/Utterly-Nord-Solid/Utterly-Nord-Solid.svg".source = "${unstablePkgs.utterly-nord-plasma}/share/Kvantum/Utterly-Nord-Solid/Utterly-Nord-Solid.svg";
      "Kvantum/Utterly-Nord-Solid-Plasma/Utterly-Nord-Solid/Nord.patchconfig".source = "${unstablePkgs.utterly-nord-plasma}/share/Kvantum/Utterly-Nord-Solid/Nord.patchconfig";
      "Kvantum/kvantum.kvconfig".text = "[General]\ntheme=Utterly-Nord-Solid";
    };

```

👁 What’s happening here? 👁

We’re telling our **home environment** to use a cool theme called ‘Utterly Nord Plasma’. By pointing to the **unstable channel** , we get the latest goodies. We also directly tell our **system** where to find the **theme’s configuration** files.

📁 Finding Theme Files 📁

Not sure where your **theme’s files** are? Run this magic spell in your **terminal** :

`nix-store -q --requisites /nix/store/*-package-name*`

Replace `package-name` with the name of your **theme package**. This command will reveal all the **paths related to your theme** in the **Nix store**.

Hope this helps! Happy theming! ✨

P.S. Quick note, friends! This guide assumes that you’re using a setup where Home Manager is integrated as part of your **Nix system configuration**. If you’re running **Home Manager standalone** , the steps will differ slightly. This setup is great for a cohesive **environment** where **system and user configurations are harmoniously blended**. 🤝 Happy configuring! 🛠✨

---

<div class="post-metadata">

### Author: ![ThinkChaos](https://discourse.nixos.org/user_avatar/discourse.nixos.org/thinkchaos/32/29687_2.png) [@ThinkChaos](https://discourse.nixos.org/u/ThinkChaos)
#### Post date: [November 27, 2023, 3:49am UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/3 "2023-11-27T03:49:02Z")

</div>

Hi, thanks a lot for your post, it was very helpful to get it working on my side!

A couple things: the system configuration section you posted is actually a mix of HM and NixOS.  
And I’ve got it down to something a bit simpler 🙂

All of the following is in my HM config:

```nix
qt = {
  enable = true;

  platformTheme = "qtct";

  style.name = "kvantum";
};

xdg.configFile = {
  "Kvantum/kvantum.kvconfig".text = ''
    [General]
    theme=GraphiteNordDark
  '';

  "Kvantum/GraphiteNord".source = "${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord";
};

```

I prefer not overriding `qt.style.package` so HM provides all the kvantum libs for me (there’s a couple you’re missing for Qt6, see [here](https://github.com/nix-community/home-manager/blob/3de857fa7d996a60966cccb44fbfce8d3c4544d8/modules/misc/qt.nix)).

The quick way to find the theme name and path I do is open a shell with the theme package so it’s in your store. Then do `ls /nix/store/*-${pkg}*`.  
You should see a `share` folder and in there the themes. The theme name is just the name of the `.kvconfig` file.

---

<div class="post-metadata">

### Author: ![anon77591810](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/a/b5e925/32.png) [@anon77591810](https://discourse.nixos.org/u/anon77591810)
#### Post date: [December 1, 2023, 3:16am UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/4 "2023-12-01T03:16:04Z")

</div>

Hello, good to hear, now my config looks different, it’s modified, and I can’t move this thing to Home-Manager, I don’t know how the qtct option works for you, when it’s not in NixOS, there’s qt5ct instead.

My properly config now:

System and Home-Manager config:

```auto

  environment.sessionVariables = {
    XDG_CURRENT_DESKTOP = "Hyprland";
    XDG_SESSION_DESKTOP = "Hyprland";
    XDG_SESSION_TYPE = "wayland";
    GDK_BACKEND = "wayland";
    GTK_USE_PORTAL = "1";
    QT_QPA_PLATFORMTHEME = "qt5ct";
    QT_QPA_PLATFORM = "wayland";
    QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
    QT_AUTO_SCREEN_SCALE_FACTOR = "1";
    MOZ_ENABLE_WAYLAND = "1";
  };
  users.users.varmisa = {
    isNormalUser = true;
    description = "Varmisanth";
    extraGroups = ["networkmanager" "wheel" "audio"];
    packages = with pkgs; [
      unstable.telegram-desktop
      gnome.nautilus
      gparted
      (callPackage /etc/nixos/gui/terminals/rio/default.nix { })
      libsForQt5.qtstyleplugin-kvantum
      libsForQt5.lightly
      unstable.qt6Packages.qt6ct
      qt6.qtwayland
      qt5.qtwayland
      unstable.wl-screenrec
      appimage-run
      hyprpaper
      xdg-utils
      procps
      slurp
      grim
      imv
      wl-clipboard
      cliphist
      nix-prefetch-github
      git
    ];
  };
 qt = {
    enable = true;
    platformTheme = "qt5ct";
    style = {
      package = pkgs.catppuccin-kvantum;
      name = "kvantum";
    };
  };

  home-manager.users.varmisa = { pkgs, ... }:
    let
      unstablePkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {
        config = config.nixpkgs.config;
      };
    in
    {
      home.packages = with pkgs; [
        (unstablePkgs.catppuccin-kvantum.override {
          accent = "Blue";
          variant = "Macchiato";
        })
      ];
      xdg.configFile = {
        "Kvantum/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.kvconfig".source = "${unstablePkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Blue/Cattpuccin-Macchiato-Blue.kvconfig";
        "Kvantum/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.svg".source = "${unstablePkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Blue/Cattpuccin-Macchiato-Blue.svg";
      };
      gtk = {
        enable = true;
        theme = {
          name = "Tokyonight-Dark-BL";
          package = pkgs.tokyo-night-gtk;
        };
        iconTheme = {
          name = "TokyoNight-SE";
          package = tokyo-night-icons;
        };
      };
      home.pointerCursor = {
        gtk.enable = true;
        package = pkgs.bibata-cursors;
        name = "Bibata-Modern-Classic";
        size = 24;
      };
      home.stateVersion = "23.05";
    };
  system.stateVersion = "23.05";
}

```

---

<div class="post-metadata">

### Author: ![ThinkChaos](https://discourse.nixos.org/user_avatar/discourse.nixos.org/thinkchaos/32/29687_2.png) [@ThinkChaos](https://discourse.nixos.org/u/ThinkChaos)
#### Post date: [December 1, 2023, 4:04am UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/5 "2023-12-01T04:04:15Z")

</div>

`qtct` works because HM rewrites it to `qt5ct` automatically: [qt.nix](https://github.com/nix-community/home-manager/blob/3de857fa7d996a60966cccb44fbfce8d3c4544d8/modules/misc/qt.nix#L12-L18)  
That was originally added in [d214b93](https://github.com/nix-community/home-manager/commit/d214b93ee3c82b2746b85e8cb96bc150c6a74e50), which is from June and not yet in any stable HM branch though, so if you’re on NixOS+HM stable it won’t yet work.

---

<div class="post-metadata">

### Author: ![anon77591810](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/a/b5e925/32.png) [@anon77591810](https://discourse.nixos.org/u/anon77591810)
#### Post date: [December 1, 2023, 11:29pm UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/6 "2023-12-01T23:29:53Z")

</div>

Yes, I’m using stable 23.05 ( since yesterday it deprecated ).

---

<div class="post-metadata">

### Author: ![itslychee](https://discourse.nixos.org/user_avatar/discourse.nixos.org/itslychee/32/13055_2.png) [@itslychee](https://discourse.nixos.org/u/itslychee)
#### Post date: [February 12, 2024, 11:52am UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/7 "2024-02-12T11:52:35Z")

</div>

you shouldn’t be configuring a qt theme inside `nixpkgs.config`, this is bad advice and I have my doubts as if this actually worked or not.

---

<div class="post-metadata">

### Author: ![mun](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mun/32/15722_2.png) [@mun](https://discourse.nixos.org/u/mun)
#### Post date: [March 3, 2024, 6:05am UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/8 "2024-03-03T06:05:21Z")

</div>

I could not get the [nixos option](https://search.nixos.org/options?channel=unstable&show=qt.style&from=0&size=50&sort=relevance&type=packages&query=adwaita) qt style to work.

So this is how I do it, with nixos unstable 24.05 and it works.

`/etc/nixos/configuration.nix`

```auto
environment.systemPackages = with pkgs; [
      adwaita-qt
   ];

environment.sessionVariables = {
QT_STYLE_OVERRIDE = "adwaita-dark";
};

```

---

<div class="post-metadata">

### Author: ![sachinchaudhary1808](https://discourse.nixos.org/user_avatar/discourse.nixos.org/sachinchaudhary1808/32/17430_2.png) [@sachinchaudhary1808](https://discourse.nixos.org/u/sachinchaudhary1808)
#### Post date: [June 30, 2024, 1:41pm UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/9 "2024-06-30T13:41:45Z")

</div>

same here thanks for this

---

<div class="post-metadata">

### Author: ![Alexuty](https://discourse.nixos.org/user_avatar/discourse.nixos.org/alexuty/32/35180_2.png) [@Alexuty](https://discourse.nixos.org/u/Alexuty)
#### Post date: [November 15, 2025, 7:55am UTC](https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/10 "2025-11-15T07:55:24Z")

</div>

This worked so great, thank you! For some applications like Ark, I had to add `adwaita-qt6` to the system packages in order to get the theme to apply.
