nixos/display-managers: move "generic" DM unit to its own option set

This is the first step towards deprecating it.
This commit is contained in:
K900 2026-01-14 17:31:49 +03:00
commit e49259f489
11 changed files with 134 additions and 126 deletions

View file

@ -217,27 +217,30 @@ in
# Enable desktop session data
enable = true;
environment = {
GDM_X_SERVER_EXTRA_ARGS = toString (lib.filter (arg: arg != "-terminate") xdmcfg.xserverArgs);
XDG_DATA_DIRS = lib.makeSearchPath "share" [
gdm # for gnome-login.session
config.services.displayManager.sessionData.desktops
pkgs.gnome-control-center # for accessibility icon
pkgs.adwaita-icon-theme
pkgs.hicolor-icon-theme # empty icon theme as a base
];
}
// lib.optionalAttrs (xSessionWrapper != null) {
# Make GDM use this wrapper before running the session, which runs the
# configured setupCommands. This relies on a patched GDM which supports
# this environment variable.
GDM_X_SESSION_WRAPPER = "${xSessionWrapper}";
generic = {
enable = true;
environment = {
GDM_X_SERVER_EXTRA_ARGS = toString (lib.filter (arg: arg != "-terminate") xdmcfg.xserverArgs);
XDG_DATA_DIRS = lib.makeSearchPath "share" [
gdm # for gnome-login.session
config.services.displayManager.sessionData.desktops
pkgs.gnome-control-center # for accessibility icon
pkgs.adwaita-icon-theme
pkgs.hicolor-icon-theme # empty icon theme as a base
];
}
// lib.optionalAttrs (xSessionWrapper != null) {
# Make GDM use this wrapper before running the session, which runs the
# configured setupCommands. This relies on a patched GDM which supports
# this environment variable.
GDM_X_SESSION_WRAPPER = "${xSessionWrapper}";
};
execCmd = "exec ${gdm}/bin/gdm";
preStart = lib.optionalString (defaultSessionName != null) ''
# Set default session in session chooser to a specified values basically ignore session history.
${setSessionScript}/bin/set-session ${config.services.displayManager.sessionData.autologinSession}
'';
};
execCmd = "exec ${gdm}/bin/gdm";
preStart = lib.optionalString (defaultSessionName != null) ''
# Set default session in session chooser to a specified values basically ignore session history.
${setSessionScript}/bin/set-session ${config.services.displayManager.sessionData.autologinSession}
'';
};
systemd.tmpfiles.rules = [