1 { config, lib, pkgs, ... }:
4 cfg = config.services.xserver.gdk-pixbuf;
6 loadersCache = pkgs.gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
7 extraLoaders = lib.unique (cfg.modulePackages);
13 services.xserver.gdk-pixbuf.modulePackages = lib.mkOption {
14 type = lib.types.listOf lib.types.package;
16 description = lib.mdDoc "Packages providing GDK-Pixbuf modules, for cache generation.";
20 # If there is any package configured in modulePackages, we generate the
21 # loaders.cache based on that and set the environment variable
22 # GDK_PIXBUF_MODULE_FILE to point to it.
23 config = lib.mkIf (cfg.modulePackages != []) {
24 environment.sessionVariables = {
25 GDK_PIXBUF_MODULE_FILE = "${loadersCache}";