nixos/gdk-pixbuf: move out of xserver

This commit is contained in:
Sandro Jäckel 2024-05-02 16:29:25 +02:00
parent 2bab703953
commit b939c54015
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
5 changed files with 12 additions and 8 deletions

View file

@ -192,6 +192,7 @@
./programs/fzf.nix ./programs/fzf.nix
./programs/gamemode.nix ./programs/gamemode.nix
./programs/gamescope.nix ./programs/gamescope.nix
./programs/gdk-pixbuf.nix
./programs/geary.nix ./programs/geary.nix
./programs/git.nix ./programs/git.nix
./programs/gnome-disks.nix ./programs/gnome-disks.nix
@ -1472,7 +1473,6 @@
./services/x11/display-managers/xpra.nix ./services/x11/display-managers/xpra.nix
./services/x11/extra-layouts.nix ./services/x11/extra-layouts.nix
./services/x11/fractalart.nix ./services/x11/fractalart.nix
./services/x11/gdk-pixbuf.nix
./services/x11/hardware/cmt.nix ./services/x11/hardware/cmt.nix
./services/x11/hardware/digimend.nix ./services/x11/hardware/digimend.nix
./services/x11/hardware/synaptics.nix ./services/x11/hardware/synaptics.nix

View file

@ -1,16 +1,20 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.services.xserver.gdk-pixbuf; cfg = config.programs.gdk-pixbuf;
loadersCache = pkgs.gnome._gdkPixbufCacheBuilder_DO_NOT_USE { loadersCache = pkgs.gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
extraLoaders = lib.unique (cfg.modulePackages); extraLoaders = lib.unique cfg.modulePackages;
}; };
in in
{ {
imports = [
(lib.mkRenamedOptionModule [ "services" "xserver" "gdk-pixbuf" ] [ "programs" "gdk-pixbuf" ])
];
options = { options = {
services.xserver.gdk-pixbuf.modulePackages = lib.mkOption { programs.gdk-pixbuf.modulePackages = lib.mkOption {
type = lib.types.listOf lib.types.package; type = lib.types.listOf lib.types.package;
default = [ ]; default = [ ];
description = "Packages providing GDK-Pixbuf modules, for cache generation."; description = "Packages providing GDK-Pixbuf modules, for cache generation.";
@ -22,7 +26,7 @@ in
# GDK_PIXBUF_MODULE_FILE to point to it. # GDK_PIXBUF_MODULE_FILE to point to it.
config = lib.mkIf (cfg.modulePackages != []) { config = lib.mkIf (cfg.modulePackages != []) {
environment.sessionVariables = { environment.sessionVariables = {
GDK_PIXBUF_MODULE_FILE = "${loadersCache}"; GDK_PIXBUF_MODULE_FILE = loadersCache;
}; };
}; };
} }

View file

@ -217,7 +217,7 @@ in {
environment.sessionVariables.KPACKAGE_DEP_RESOLVERS_PATH = "${kdePackages.frameworkintegration.out}/libexec/kf6/kpackagehandlers"; environment.sessionVariables.KPACKAGE_DEP_RESOLVERS_PATH = "${kdePackages.frameworkintegration.out}/libexec/kf6/kpackagehandlers";
# Enable GTK applications to load SVG icons # Enable GTK applications to load SVG icons
services.xserver.gdk-pixbuf.modulePackages = [pkgs.librsvg]; programs.gdk-pixbuf.modulePackages = [pkgs.librsvg];
fonts.packages = [cfg.notoPackage pkgs.hack-font]; fonts.packages = [cfg.notoPackage pkgs.hack-font];
fonts.fontconfig.defaultFonts = { fonts.fontconfig.defaultFonts = {

View file

@ -327,7 +327,7 @@ in
}; };
# Enable GTK applications to load SVG icons # Enable GTK applications to load SVG icons
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
fonts.packages = with pkgs; [ cfg.notoPackage hack-font ]; fonts.packages = with pkgs; [ cfg.notoPackage hack-font ];
fonts.fontconfig.defaultFonts = { fonts.fontconfig.defaultFonts = {

View file

@ -153,7 +153,7 @@ in
}]; }];
services.xserver.updateDbusEnvironment = true; services.xserver.updateDbusEnvironment = true;
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
# Enable helpful DBus services. # Enable helpful DBus services.
services.udisks2.enable = true; services.udisks2.enable = true;