Skip to content

Instantly share code, notes, and snippets.

@MatthewCroughan
Created April 11, 2021 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MatthewCroughan/bc108f2947894b9fc2a63ee1da4da3cb to your computer and use it in GitHub Desktop.
Save MatthewCroughan/bc108f2947894b9fc2a63ee1da4da3cb to your computer and use it in GitHub Desktop.

In my home-manager config, I do the following:

  qt = {
    enable = true;
    platformTheme = "gnome";
    style = {
      name = "adwaita-dark";
      package = pkgs.adwaita-qt;
    };
  };

This is supposed to set up QT_ variables. The following lines of Nix in qt,nix from home-manager do it: https://github.com/nix-community/home-manager/blob/master/modules/misc/qt.nix#L99-L102

This qt.nix uses home.sessionVariables to accomplish it, which puts the following in ~/.profile: . "/etc/profiles/per-user/matthew/etc/profile.d/hm-session-vars.sh"

Then, hm-session-vars.sh has the following in it:

export QT_QPA_PLATFORMTHEME="gnome"
export QT_STYLE_OVERRIDE="adwaita-dark"

The problem is that nothing is sourcing ~/.profile. gdm won't, sddm won't. So it never works out.

Instead of sway I need to bash -l -c sway, then it'll source my ~/.profile regardless, as mentioned in swaywm/sway#3109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment