Nixpkgs: GPG Agent Pinentry Gnome3 window doesn’t inherit Adwaita Dark theme on NixOS 20.09

Created on 15 Sep 2020  Â·  5Comments  Â·  Source: NixOS/nixpkgs

On NixOS 20.03 channel it used to work (Adwaita Dark was used instead). As far as I remember just because I set environment.variables.GTK_THEME = "Adwaita:dark"; (see https://github.com/unclechu/nixos-config/blob/41e8bc34a12d018f645cfabcd892cab381e583c1/configuration.nix#L125).

But when I switched to nixos-unstable channel it stopped inheriting the dark theme. As well as now on nixos-20.09:
2020-09-14-132244_6400x2864_scrot

My GnuPG config:
https://github.com/unclechu/nixos-config/blob/41e8bc34a12d018f645cfabcd892cab381e583c1/configuration.nix#L157

bug

All 5 comments

Can you try environment.sessionVariables?

@worldofpeace It did work for me, even LightDM now is inheriting the Adwaita Dark theme, that I haven’t seen before. Thanks!
The commit which fixes it: https://github.com/unclechu/nixos-config/commit/4556b2029980a2303bcf0a00708053457f197646
2020-09-15-033806_1920x1080_scrot

By the way. When the environment.variables are applied?

I believe you noticed this change because this stuff got moved into a systemd user service, and environment.variables does nothing for them.

When the environment.variables are applied?

Do you mean how they are applied?

@worldofpeace

Do you mean how they are applied?

I specifically mean “when”, like at what stage. I assume it should have some layers. Like I could imagine env vars defied at:

  1. In the earliest point of userspace running
  2. Before services like systemd ones
  3. Before loading X server
  4. Before loading particular WM
  5. After WM is loaded (for child applications)
    Something like this, from bottom to top layer.

Lightdm is a special exception because it uses clearenv so sessionVariables (which uses pam) is the only option that can influence it https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/display-managers/lightdm.nix#L287.

environment.variables is set from set-environment which is sourced into shell environments as early as possible https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/shells-environment.nix#L184

Was this page helpful?
0 / 5 - 0 ratings

Related issues

teto picture teto  Â·  3Comments

matthiasbeyer picture matthiasbeyer  Â·  3Comments

edolstra picture edolstra  Â·  3Comments

chris-martin picture chris-martin  Â·  3Comments

copumpkin picture copumpkin  Â·  3Comments