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