nixos/gdk-pixbuf: move GDK_PIXBUF_MODULE_FILE to sessionVariables

Some environments do not load /etc/profile, so environment.variables do
not work. In particular, this is the case for Plasma Wayland.

Use environment.sessionVariables for setting that variable instead,
which is handled by PAM and hence more reliable.

Changed files
+1 -1
nixos
modules
services
+1 -1
nixos/modules/services/x11/gdk-pixbuf.nix
···
# loaders.cache based on that and set the environment variable
# GDK_PIXBUF_MODULE_FILE to point to it.
config = lib.mkIf (cfg.modulePackages != []) {
-
environment.variables = {
GDK_PIXBUF_MODULE_FILE = "${loadersCache}";
};
};
···
# loaders.cache based on that and set the environment variable
# GDK_PIXBUF_MODULE_FILE to point to it.
config = lib.mkIf (cfg.modulePackages != []) {
+
environment.sessionVariables = {
GDK_PIXBUF_MODULE_FILE = "${loadersCache}";
};
};