Skip to content

Commit 3ede32d

Browse files
authored
nixos/gdm: add extraPackages to extend XDG_DATA_DIRS (NixOS#507768)
2 parents 48137c8 + b0ae5a6 commit 3ede32d

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

  • nixos/modules/services/display-managers

nixos/modules/services/display-managers/gdm.nix

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ in
169169
'';
170170
};
171171

172+
extraPackages = lib.mkOption {
173+
type = lib.types.listOf lib.types.package;
174+
default = [ ];
175+
example = lib.literalExpression "[ pkgs.gnome-themes-extra ]";
176+
description = ''
177+
Additional packages to add to XDG_DATA_DIRS for GDM.
178+
The `/share` directory of each package will be added to the data path.
179+
'';
180+
};
181+
172182
};
173183

174184
};
@@ -221,13 +231,16 @@ in
221231
enable = true;
222232
environment = {
223233
GDM_X_SERVER_EXTRA_ARGS = toString (lib.filter (arg: arg != "-terminate") xdmcfg.xserverArgs);
224-
XDG_DATA_DIRS = lib.makeSearchPath "share" [
225-
gdm # for gnome-login.session
226-
config.services.displayManager.sessionData.desktops
227-
pkgs.gnome-control-center # for accessibility icon
228-
pkgs.adwaita-icon-theme
229-
pkgs.hicolor-icon-theme # empty icon theme as a base
230-
];
234+
XDG_DATA_DIRS = lib.makeSearchPath "share" (
235+
[
236+
gdm # for gnome-login.session
237+
config.services.displayManager.sessionData.desktops
238+
pkgs.gnome-control-center # for accessibility icon
239+
pkgs.adwaita-icon-theme
240+
pkgs.hicolor-icon-theme # empty icon theme as a base
241+
]
242+
++ cfg.extraPackages
243+
);
231244
}
232245
// lib.optionalAttrs (xSessionWrapper != null) {
233246
# Make GDM use this wrapper before running the session, which runs the

0 commit comments

Comments
 (0)