···29 fi
30 '') cfg.sessionPackages}
31 '';
32-33- dmDefault = config.services.xserver.desktopManager.default;
34- # fallback default for cases when only default wm is set
35- dmFallbackDefault = if dmDefault != null then dmDefault else "none";
36- wmDefault = config.services.xserver.windowManager.default;
37- defaultSessionFromLegacyOptions = dmFallbackDefault + lib.optionalString (wmDefault != null && wmDefault != "none") "+${wmDefault}";
38in
39{
40 options = {
···125 ${lib.concatStringsSep "\n " cfg.displayManager.sessionData.sessionNames}
126 '';
127 };
128- default =
129- if dmDefault != null || wmDefault != null then
130- defaultSessionFromLegacyOptions
131- else
132- null;
133- defaultText = lib.literalMD ''
134- Taken from display manager settings or window manager settings, if either is set.
135- '';
136 example = "gnome";
137 description = ''
138 Graphical session to pre-select in the session chooser (only effective for GDM, LightDM and SDDM).
···191 '';
192 }
193 ];
194-195- warnings =
196- lib.mkIf (dmDefault != null || wmDefault != null) [
197- ''
198- The following options are deprecated:
199- ${lib.concatStringsSep "\n " (map ({c, t}: t) (lib.filter ({c, t}: c != null) [
200- { c = dmDefault; t = "- services.xserver.desktopManager.default"; }
201- { c = wmDefault; t = "- services.xserver.windowManager.default"; }
202- ]))}
203- Please use
204- services.displayManager.defaultSession = "${defaultSessionFromLegacyOptions}";
205- instead.
206- ''
207- ];
208209 # Make xsessions and wayland sessions available in XDG_DATA_DIRS
210 # as some programs have behavior that depends on them being present
···29 fi
30 '') cfg.sessionPackages}
31 '';
00000032in
33{
34 options = {
···119 ${lib.concatStringsSep "\n " cfg.displayManager.sessionData.sessionNames}
120 '';
121 };
122+ default = null;
0000000123 example = "gnome";
124 description = ''
125 Graphical session to pre-select in the session chooser (only effective for GDM, LightDM and SDDM).
···178 '';
179 }
180 ];
00000000000000181182 # Make xsessions and wayland sessions available in XDG_DATA_DIRS
183 # as some programs have behavior that depends on them being present