nixos/xfce: Use upstream name for X11 session

This allows keeping the name consistent with the wayland
session we are introducing later.
This commit is contained in:
Bobby Rong 2024-10-19 09:59:02 +08:00
parent 270c3f1058
commit 3c20ab171f
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -144,6 +144,7 @@ in
services.xserver.desktopManager.session = [{
name = "xfce";
prettyName = "Xfce Session";
desktopNames = [ "XFCE" ];
bgSupport = !cfg.noDesktop;
start = ''

View file

@ -279,6 +279,11 @@ in
lib.mapCartesianProduct
({dm, wm}: let
sessionName = "${dm.name}${optionalString (wm.name != "none") ("+" + wm.name)}";
prettyName =
if dm.name != "none" then
"${dm.prettyName or dm.name}${optionalString (wm.name != "none") (" (" + (wm.prettyName or wm.name) + ")")}"
else
(wm.prettyName or wm.name);
script = xsession dm wm;
desktopNames = if dm ? desktopNames
then lib.concatStringsSep ";" dm.desktopNames
@ -297,7 +302,7 @@ in
Type=XSession
TryExec=${script}
Exec=${script}
Name=${sessionName}
Name=${prettyName}
DesktopNames=${desktopNames}
'';
} // {